Changeset 8696 for 2017/24/GregoryK


Ignore:
Timestamp:
2017-06-15 11:53:22 (2 years ago)
Author:
npo17_12
Message:
 
Location:
2017/24/GregoryK/LimaPeli
Files:
5 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2017/24/GregoryK/LimaPeli/LimaPeli/LimaPeli/LimaPeli.cs

    r8639 r8696  
    3838    } 
    3939         
    40      
     40    void LisaaTeleportti(Vector paikka, double korkeus, double leveys) 
     41    { 
     42        PhysicsObject Telportti = PhysicsObject.CreateStaticObject(korkeus, leveys); 
     43        Telportti.Tag = "Teleportti"; 
     44        Telportti.Position = paikka; 
     45 
     46        Add(Telportti); 
     47    } 
    4148 
    4249    void LuoKentta(string kenttaTiedostonNimi) 
     
    4754        kentta.SetTileMethod('*', LisaaTahti); 
    4855        kentta.SetTileMethod('N', LisaaPelaaja); 
     56        kentta.SetTileMethod('T', LisaaTeleportti); 
    4957        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    5058        Level.CreateBorders(); 
     
    6270    } 
    6371 
    64     void TormasiMaaliin(PhysicsObject slime, PhysicsObject maali) 
     72    void TormaaTeleporttiin(PhysicsObject slime, PhysicsObject maali) 
    6573    { 
    6674        //Kasvatetaan kenttänumeroa yhdellä ja siirrytään seuraavaan kenttään: 
     
    7482        SeuraavaKentta(); 
    7583    } 
     84 
    7685 
    7786    void LisaaTaso(Vector paikka, double leveys, double korkeus) 
     
    101110        pelaaja1.Image = pelaajanKuva; 
    102111        AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
     112        AddCollisionHandler(pelaaja1, "Teleportti", TormaaTeleporttiin); 
    103113        pelaaja1.Animation = new Animation(limanKavely); 
    104114        pelaaja1.Animation.Start(); 
     
    114124        Keyboard.Listen(Key.Right, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus); 
    115125        Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 
     126        Keyboard.Listen(Key.P, ButtonState.Pressed, Pause, "Pysäyttää palin"); 
    116127 
    117128        ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); 
  • 2017/24/GregoryK/LimaPeli/LimaPeli/LimaPeli/LimaPeli.csproj.Debug.cachefile

    r8639 r8696  
    88Content\slime\slime3_0.xnb 
    99Content\slime\slime4_0.xnb 
     10Content\kentta2.xnb 
  • 2017/24/GregoryK/LimaPeli/LimaPeli/LimaPeli/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r8662 r8696  
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\GregoryK\LimaPeli\LimaPeli\LimaPeli\bin\x86\Debug\Content\kentta1.xnb</Output> 
    20       <Time>2017-06-14T13:59:24.3118677+03:00</Time> 
     20      <Time>2017-06-15T11:50:53.6422744+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    8585      <Time>2017-06-14T10:48:12.2319619+03:00</Time> 
    8686    </Item> 
     87    <Item> 
     88      <Source>kentta2.txt</Source> 
     89      <Name>kentta2</Name> 
     90      <Importer>TextFileImporter</Importer> 
     91      <Processor>TextFileContentProcessor</Processor> 
     92      <Options>None</Options> 
     93      <Output>C:\MyTemp\GregoryK\LimaPeli\LimaPeli\LimaPeli\bin\x86\Debug\Content\kentta2.xnb</Output> 
     94      <Time>2017-06-15T10:09:19.633708+03:00</Time> 
     95    </Item> 
    8796    <BuildSuccessful>true</BuildSuccessful> 
    8897    <Settings> 
  • 2017/24/GregoryK/LimaPeli/LimaPeli/LimaPeli/obj/x86/Debug/LimaPeli.csproj.FileListAbsolute.txt

    r8639 r8696  
    1616C:\MyTemp\GregoryK\LimaPeli\LimaPeli\LimaPeli\bin\x86\Debug\Content\slime\slime3_0.xnb 
    1717C:\MyTemp\GregoryK\LimaPeli\LimaPeli\LimaPeli\bin\x86\Debug\Content\slime\slime4_0.xnb 
     18C:\MyTemp\GregoryK\LimaPeli\LimaPeli\LimaPeli\bin\x86\Debug\Content\kentta2.xnb 
  • 2017/24/GregoryK/LimaPeli/LimaPeli/LimaPeli/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r8639 r8696  
    88Content\slime\slime3_0.xnb 
    99Content\slime\slime4_0.xnb 
     10Content\kentta2.xnb 
  • 2017/24/GregoryK/LimaPeli/LimaPeli/LimaPeliContent/LimaPeliContent.contentproj

    r8639 r8696  
    7878    </Compile> 
    7979  </ItemGroup> 
    80   <ItemGroup /> 
     80  <ItemGroup> 
     81    <Compile Include="kentta2.txt"> 
     82      <Name>kentta2</Name> 
     83      <Importer>TextFileImporter</Importer> 
     84      <Processor>TextFileContentProcessor</Processor> 
     85    </Compile> 
     86  </ItemGroup> 
    8187  <ItemGroup> 
    8288    <Compile Include="slime\slime1.png"> 
  • 2017/24/GregoryK/LimaPeli/LimaPeli/LimaPeliContent/kentta1.txt

    r8662 r8696  
    1 ..........#*#.......... 
    2 .....*...........*..... 
    3 .....#...........#..... 
    4 .......*.......*....... 
    5 ......###.....###...... 
    6 .........*...*......... 
    7 .........#...#......... 
    8 ...........*........... 
    9 ..........###...*...... 
    10 ####################### 
     1........................................................................................................................................................................................................................ 
     2........................................................................................................................................................................................................................ 
     3........................................................................................................................................................................................................................ 
     4........................................................................................................................................................................................................................ 
     5........................................................................................................................................................................................................................ 
     6........................................................................................................................................................................................................................ 
     7........................................................................................................................................................................................................................ 
     8........................................................................................................................................................................................................................ 
     9.....................................##..##..##..##........................................................................................................................................................................... 
     10........................................................................................................................................................................................................................ 
     11................................*.###..##..##..##........................*...........................*...................*.................................................................................................... 
     12.............................*........................##...........###.........................#...................#.................................................................................................... 
     13...........................*.###......................####.*...........................*...#........#.........#........#...*.............................................................................................. 
     14........................*.............................######...........................#.................*.................#.............................................................................................. 
     15........................###...........................########.....................#....................###....................#.......................................................................................... 
     16...........N........................................*.##########..*..................................................................................................................................................... 
     17######################################################################################################################################################################################################################## 
Note: See TracChangeset for help on using the changeset viewer.