Changeset 6025


Ignore:
Timestamp:
2015-06-11 13:55:41 (8 years ago)
Author:
eeonilni
Message:
 
Location:
2015/24/EemeliN/Space-adventure
Files:
9 added
2 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • 2015/24/EemeliN/Space-adventure/Space-adventure/Space-adventure/Space-adventure.csproj.Debug.cachefile

    r6017 r6025  
    33Content\tahti.xnb 
    44Content\space tausta.xnb 
    5 Content\kenttÀ 1.xnb 
    65Content\kenttÀ 2.xnb 
    76Content\pelaajan kuva.xnb 
     
    1211Content\maali kilppari.xnb 
    1312Content\pelin pahis.xnb 
     13Content\kenttÀ.3.xnb 
     14Content\kolikeita.xnb 
     15Content\Koliket.xnb 
     16Content\Effect1.xnb 
  • 2015/24/EemeliN/Space-adventure/Space-adventure/Space-adventure/Space_adventure.cs

    r6017 r6025  
    1010{ 
    1111    const double nopeus = 200; 
    12     const double hyppyNopeus = 750; 
     12    const double hyppyNopeus =  800; 
    1313    const int RUUDUN_KOKO = 40; 
    1414 
     
    1616    PlatformCharacter pelaaja2; 
    1717    Image pelaajanKuva = LoadImage("oikean kokoinen pelaajan kuva"); 
    18     Image tahtiKuva = LoadImage("tahti"); 
     18    Image tahtiKuva = LoadImage("koliket"); 
    1919    Image welhopahis = LoadImage("welho pahis"); 
    2020    Image maalikuva = LoadImage("maali kilppari"); 
    2121    Image PahisKuva = LoadImage("pelin pahis"); 
    2222    SoundEffect maaliAani = LoadSoundEffect("maali"); 
     23    int kenttaNro = 2; 
     24 
     25    List<Vector> spawnit = new List<Vector>(); 
    2326 
    2427    public override void Begin() 
    2528    { 
    26         Gravity = new Vector(0, -9.81); 
    27  
    28         LuoKentta(); 
     29 
     30        OneInTheChamper(); 
    2931         luoAse(pelaaja1); 
    3032         luoAse(pelaaja2); 
    3133         
    32         LisaaNappaimet(); 
     34        //LisaaNappaimet(); 
    3335 
    3436        Camera.Follow(pelaaja1, pelaaja2); 
     
    3840 
    3941 
    40     void LuoKentta() 
    41     { 
    42         ColorTileMap kentta = ColorTileMap.FromLevelAsset("kenttä 2"); 
     42    void LuoKentta(string kentanNimi) 
     43    { 
     44        ColorTileMap kentta = ColorTileMap.FromLevelAsset(kentanNimi); 
    4345        kentta.SetTileMethod(Color.Gray, LisaaTaso); 
    4446        kentta.SetTileMethod(Color.Gold, LisaaTahti); 
    4547        kentta.SetTileMethod(Color.Black, LisaaPelaaja); 
    4648        kentta.SetTileMethod(Color.Rose, LisaaMaali); 
     49        kentta.SetTileMethod(Color.BloodRed, LisaaSpawn); 
    4750       
    4851        kentta.SetTileMethod(Color.White, LisaaVihollinen); 
     
    5154        Level.Size = new Vector(3250, 5000); 
    5255        Level.Background.FitToLevel(); 
     56 
    5357        Gravity = new Vector(0, -1000.81); 
    5458        //Level.Width = Screen.Width; 
     
    182186            MessageDisplay.Add("pelaaja2 voitti!"); 
    183187        } 
     188        kenttaNro++; 
     189        ClearAll(); 
     190        OneInTheChamper(); 
    184191    } 
    185192 
     
    197204        hahmo.Weapon.InfiniteAmmo = true; 
    198205        hahmo.Weapon.CanHitOwner = false; 
     206        hahmo.Weapon.Image = null; 
     207        hahmo.Weapon.Color = Color.Transparent; 
    199208         
    200209        hahmo.Weapon.Power.MaxValue = 2000000; 
     
    230239    } 
    231240 
     241    void OneInTheChamper() 
     242    { 
     243        spawnit.Clear(); 
     244        if (kenttaNro == 2) LuoKentta("kenttä 2"); 
     245        else if (kenttaNro == 3) 
     246        { 
     247            LuoKentta("kenttä.3"); 
     248            LisaaPelaaja(Vector.Zero, RUUDUN_KOKO, RUUDUN_KOKO); 
     249            pelaaja1.Position = RandomGen.SelectOne<Vector>(spawnit); 
     250            pelaaja2.Position = RandomGen.SelectOne<Vector>(spawnit); 
     251        } 
     252        else if (kenttaNro > 3) Exit(); 
     253 
     254 
     255         luoAse(pelaaja1); 
     256         luoAse(pelaaja2); 
     257         
     258        LisaaNappaimet(); 
     259 
     260        Camera.Follow(pelaaja1, pelaaja2); 
     261        Camera.ZoomFactor = 1.0; 
     262        Camera.StayInLevel = false; 
     263    } 
     264 
     265    void LisaaSpawn(Vector paikka, double leveys, double korkeus) 
     266    { 
     267        spawnit.Add(paikka); 
     268    } 
     269 
     270 
    232271} 
  • 2015/24/EemeliN/Space-adventure/Space-adventure/Space-adventure/obj/x86/Debug/Space-adventure.csproj.FileListAbsolute.txt

    r6017 r6025  
    1111C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\tahti.xnb 
    1212C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\space tausta.xnb 
    13 C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\kenttÀ 1.xnb 
    1413C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\kenttÀ 2.xnb 
    1514C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\pelaajan kuva.xnb 
     
    2019C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\maali kilppari.xnb 
    2120C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\pelin pahis.xnb 
     21C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\kenttÀ.3.xnb 
     22C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\kolikeita.xnb 
     23C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\Koliket.xnb 
     24C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\Effect1.xnb 
  • 2015/24/EemeliN/Space-adventure/Space-adventure/Space-adventure/obj/x86/Debug/cachefile-{2022E80C-33D9-493A-8504-9425627AE12A}-targetpath.txt

    r6017 r6025  
    33Content\tahti.xnb 
    44Content\space tausta.xnb 
    5 Content\kenttÀ 1.xnb 
    65Content\kenttÀ 2.xnb 
    76Content\pelaajan kuva.xnb 
     
    1211Content\maali kilppari.xnb 
    1312Content\pelin pahis.xnb 
     13Content\kenttÀ.3.xnb 
     14Content\kolikeita.xnb 
     15Content\Koliket.xnb 
     16Content\Effect1.xnb 
  • 2015/24/EemeliN/Space-adventure/Space-adventure/Space-adventureContent/Space-adventureContent.contentproj

    r6017 r6025  
    7070  </ItemGroup> 
    7171  <ItemGroup> 
    72     <Compile Include="kenttä 1.png"> 
    73       <Name>kenttä 1</Name> 
    74       <Importer>TextureImporter</Importer> 
    75       <Processor>TextureProcessor</Processor> 
    76     </Compile> 
    77   </ItemGroup> 
    78   <ItemGroup> 
    7972    <Compile Include="kenttä 2.png"> 
    8073      <Name>kenttä 2</Name> 
     
    132125    </Compile> 
    133126  </ItemGroup> 
     127  <ItemGroup> 
     128    <Compile Include="kenttä.3.png"> 
     129      <Name>kenttä.3</Name> 
     130      <Importer>TextureImporter</Importer> 
     131      <Processor>TextureProcessor</Processor> 
     132    </Compile> 
     133  </ItemGroup> 
     134  <ItemGroup> 
     135    <Compile Include="kolikeita.png"> 
     136      <Name>kolikeita</Name> 
     137      <Importer>TextureImporter</Importer> 
     138      <Processor>TextureProcessor</Processor> 
     139    </Compile> 
     140  </ItemGroup> 
     141  <ItemGroup> 
     142    <Compile Include="Effect1.fx"> 
     143      <Name>Effect1</Name> 
     144      <Importer>EffectImporter</Importer> 
     145      <Processor>EffectProcessor</Processor> 
     146    </Compile> 
     147  </ItemGroup> 
     148  <ItemGroup> 
     149    <Compile Include="Koliket.png"> 
     150      <Name>Koliket</Name> 
     151      <Importer>TextureImporter</Importer> 
     152      <Processor>TextureProcessor</Processor> 
     153    </Compile> 
     154  </ItemGroup> 
    134155  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    135156  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2015/24/EemeliN/Space-adventure/Space-adventure/Space-adventureContent/obj/x86/Debug/ContentPipeline.xml

    r6017 r6025  
    3939    </Item> 
    4040    <Item> 
    41       <Source>kenttä 1.png</Source> 
    42       <Name>kenttä 1</Name> 
    43       <Importer>TextureImporter</Importer> 
    44       <Processor>TextureProcessor</Processor> 
    45       <Options>None</Options> 
    46       <Output>C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\kenttä 1.xnb</Output> 
    47       <Time>2015-06-09T15:07:46.6241874+03:00</Time> 
    48     </Item> 
    49     <Item> 
    5041      <Source>kenttä 2.png</Source> 
    5142      <Name>kenttä 2</Name> 
     
    5445      <Options>None</Options> 
    5546      <Output>C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\kenttä 2.xnb</Output> 
    56       <Time>2015-06-11T10:17:49.2626626+03:00</Time> 
     47      <Time>2015-06-11T13:13:43.2611423+03:00</Time> 
    5748    </Item> 
    5849    <Item> 
     
    119110      <Time>2015-06-11T10:23:17.8488843+03:00</Time> 
    120111    </Item> 
     112    <Item> 
     113      <Source>kenttä.3.png</Source> 
     114      <Name>kenttä.3</Name> 
     115      <Importer>TextureImporter</Importer> 
     116      <Processor>TextureProcessor</Processor> 
     117      <Options>None</Options> 
     118      <Output>C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\kenttä.3.xnb</Output> 
     119      <Time>2015-06-11T13:47:09.5927841+03:00</Time> 
     120    </Item> 
     121    <Item> 
     122      <Source>kolikeita.png</Source> 
     123      <Name>kolikeita</Name> 
     124      <Importer>TextureImporter</Importer> 
     125      <Processor>TextureProcessor</Processor> 
     126      <Options>None</Options> 
     127      <Output>C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\kolikeita.xnb</Output> 
     128      <Time>2015-06-11T13:05:05.212022+03:00</Time> 
     129    </Item> 
     130    <Item> 
     131      <Source>Koliket.png</Source> 
     132      <Name>Koliket</Name> 
     133      <Importer>TextureImporter</Importer> 
     134      <Processor>TextureProcessor</Processor> 
     135      <Options>None</Options> 
     136      <Output>C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\Koliket.xnb</Output> 
     137      <Time>2015-06-11T13:06:10.3574202+03:00</Time> 
     138    </Item> 
     139    <Item> 
     140      <Source>Effect1.fx</Source> 
     141      <Name>Effect1</Name> 
     142      <Importer>EffectImporter</Importer> 
     143      <Processor>EffectProcessor</Processor> 
     144      <Options>None</Options> 
     145      <Output>C:\MyTemp\EemeliN\Space-adventure\Space-adventure\Space-adventure\bin\x86\Debug\Content\Effect1.xnb</Output> 
     146      <Time>2015-06-11T13:05:44.1878977+03:00</Time> 
     147    </Item> 
    121148    <BuildSuccessful>true</BuildSuccessful> 
    122149    <Settings> 
Note: See TracChangeset for help on using the changeset viewer.