Changeset 8169


Ignore:
Timestamp:
2016-07-27 14:58:22 (3 years ago)
Author:
jotapoti
Message:
 
Location:
2016/30/LukaH
Files:
7 added
14 edited

Legend:

Unmodified
Added
Removed
  • 2016/30/LukaH/Spikemania/Spikemania/Spikemania/Spikemania.cs

    r8144 r8169  
    1414 
    1515     
     16 
    1617    Vector spawni = Vector.Zero; 
    1718 
     
    2223    Image pelaajanKuva = LoadImage("pelaaja"); 
    2324    Image tahtiKuva = LoadImage("tahti"); 
     25    Image nuolenkuva = LoadImage("nuoli"); 
    2426 
    2527    SoundEffect maaliAani = LoadSoundEffect("maali"); 
    2628 
    2729    public override void Begin() 
     30    { 
     31 
     32        MultiSelectWindow alkuValikko = new MultiSelectWindow("Pelin alkuvalikko", 
     33        "Aloita peli", "Lopeta"); 
     34        Add(alkuValikko); 
     35 
     36        alkuValikko.AddItemHandler(0, AloitaPeli); 
     37        alkuValikko.AddItemHandler(1, Exit); 
     38 
     39        
     40    } 
     41 
     42    void AloitaPeli() 
    2843    { 
    2944        Gravity = new Vector(0, -1000); 
     
    3550        LisaaNappaimet(); 
    3651 
    37         Camera.Follow(pelaaja1); 
    38         Camera.ZoomFactor = 0.9; 
    39         Camera.StayInLevel = true; 
    40     } 
    41  
     52        //Camera.Follow(pelaaja1); 
     53        //Camera.ZoomFactor = 0.9; 
     54        //Camera.StayInLevel = true; 
     55    } 
    4256    IntMeter pisteLaskuri; 
    4357 
     
    5973    void LuoKentta() 
    6074    { 
    61         TileMap kentta = TileMap.FromLevelAsset("Level1"); 
     75        TileMap kentta = TileMap.FromLevelAsset("Level3"); 
    6276        kentta.SetTileMethod('#', LisaaTaso); 
    6377        kentta.SetTileMethod('p', LisaaPiikki); 
     
    6579        kentta.SetTileMethod('a', LisaaAvain); 
    6680        kentta.SetTileMethod('o', LisaaOvi); 
     81        kentta.SetTileMethod('i', LisaaNakymatonTaso); 
     82        kentta.SetTileMethod('s', LisaaSavu); 
     83        kentta.SetTileMethod('n', LisaaNuoli); 
    6784        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    6885        Level.CreateBorders(); 
     
    7087        Camera.ZoomToAllObjects(); 
    7188     
     89    } 
     90    void LisaaNuoli(Vector paikka, double leveys, double korkeus) 
     91    { 
     92        PhysicsObject nuoli = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     93        nuoli.Position = paikka; 
     94        nuoli.IgnoresCollisionResponse = true; 
     95        Add(nuoli); 
     96        nuoli.Image = nuolenkuva; 
     97 
     98    } 
     99    void LisaaSavu(Vector paikka ,double leveys, double korkeus) 
     100    { 
     101        Smoke savu = new Smoke(); 
     102        savu.Position = paikka; 
     103        Add(savu); 
    72104    } 
    73105 
     
    91123        Add(Avain); 
    92124        Avain.Image = avaimenkuva; 
     125    } 
     126 
     127    void LisaaNakymatonTaso(Vector paikka, double leveys, double korkeus) 
     128    { 
     129        PhysicsObject nakymatontaso = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     130        nakymatontaso.Position = paikka; 
     131        nakymatontaso.Color = Color.Transparent; 
     132        Add(nakymatontaso); 
    93133    } 
    94134 
  • 2016/30/LukaH/Spikemania/Spikemania/Spikemania/Spikemania.csproj.Debug.cachefile

    r8144 r8169  
    66Content\avain.xnb 
    77Content\pelaaja.xnb 
     8Content\Level2.xnb 
     9Content\Level3.xnb 
     10Content\nuoli.xnb 
  • 2016/30/LukaH/Spikemania/Spikemania/Spikemania/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r8144 r8169  
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\Level1.xnb</Output> 
    38       <Time>2016-07-27T11:26:14.9582664+03:00</Time> 
     38      <Time>2016-07-27T13:44:43.6220777+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    6464      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\pelaaja.xnb</Output> 
    6565      <Time>2016-07-27T11:04:00.5084083+03:00</Time> 
     66    </Item> 
     67    <Item> 
     68      <Source>Level2.txt</Source> 
     69      <Name>Level2</Name> 
     70      <Importer>TextFileImporter</Importer> 
     71      <Processor>TextFileContentProcessor</Processor> 
     72      <Options>None</Options> 
     73      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\Level2.xnb</Output> 
     74      <Time>2016-07-27T14:04:05.1551024+03:00</Time> 
     75    </Item> 
     76    <Item> 
     77      <Source>Level3.txt</Source> 
     78      <Name>Level3</Name> 
     79      <Importer>TextFileImporter</Importer> 
     80      <Processor>TextFileContentProcessor</Processor> 
     81      <Options>None</Options> 
     82      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\Level3.xnb</Output> 
     83      <Time>2016-07-27T14:57:15.8021431+03:00</Time> 
     84    </Item> 
     85    <Item> 
     86      <Source>nuoli.png</Source> 
     87      <Name>nuoli</Name> 
     88      <Importer>TextureImporter</Importer> 
     89      <Processor>TextureProcessor</Processor> 
     90      <Options>None</Options> 
     91      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\nuoli.xnb</Output> 
     92      <Time>2016-07-27T14:54:20.0954893+03:00</Time> 
    6693    </Item> 
    6794    <BuildSuccessful>true</BuildSuccessful> 
  • 2016/30/LukaH/Spikemania/Spikemania/Spikemania/obj/x86/Debug/Spikemania.csproj.FileListAbsolute.txt

    r8144 r8169  
    1414C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\avain.xnb 
    1515C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\pelaaja.xnb 
     16C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\Level2.xnb 
     17C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\Level3.xnb 
     18C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\nuoli.xnb 
  • 2016/30/LukaH/Spikemania/Spikemania/Spikemania/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r8144 r8169  
    66Content\avain.xnb 
    77Content\pelaaja.xnb 
     8Content\Level2.xnb 
     9Content\Level3.xnb 
     10Content\nuoli.xnb 
  • 2016/30/LukaH/Spikemania/Spikemania/SpikemaniaContent/Level1.txt

    r8144 r8169  
    1 #...... 
    2 #..a... 
     1#.............................. 
     2#..a........................... 
    33#######.......................# 
    44.......#p.....................# 
  • 2016/30/LukaH/Spikemania/Spikemania/SpikemaniaContent/Level2.txt

    r8144 r8169  
     1#........#..........................# 
     2#........#..........................# 
     3#........#..........................# 
     4#a.p..............................a.# 
     5#..#...........#....#....#....ii##..# 
     6##########................pppppppp..# 
     7#...N...............................# 
     8#............#i#....................# 
     9#..................................o# 
     10#........#.........#..........#iiii## 
     11#.#i#.#.#ppppppppppp#...............# 
     12#ppppppp##############iii############ 
     13.......................a 
    114 
    215 
     
    821 
    922 
    10  
    11  
    12  
  • 2016/30/LukaH/Spikemania/Spikemania/SpikemaniaContent/SpikemaniaContent.contentproj

    r8144 r8169  
    9090    </Compile> 
    9191  </ItemGroup> 
     92  <ItemGroup> 
     93    <Compile Include="Level2.txt"> 
     94      <Name>Level2</Name> 
     95      <Importer>TextFileImporter</Importer> 
     96      <Processor>TextFileContentProcessor</Processor> 
     97    </Compile> 
     98  </ItemGroup> 
     99  <ItemGroup> 
     100    <Compile Include="Level3.txt"> 
     101      <Name>Level3</Name> 
     102      <Importer>TextFileImporter</Importer> 
     103      <Processor>TextFileContentProcessor</Processor> 
     104    </Compile> 
     105  </ItemGroup> 
     106  <ItemGroup> 
     107    <Compile Include="nuoli.png"> 
     108      <Name>nuoli</Name> 
     109      <Importer>TextureImporter</Importer> 
     110      <Processor>TextureProcessor</Processor> 
     111    </Compile> 
     112  </ItemGroup> 
    92113  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    93114  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
Note: See TracChangeset for help on using the changeset viewer.