Changeset 8530


Ignore:
Timestamp:
2017-06-12 14:58:36 (6 years ago)
Author:
npo17_3
Message:
 
Location:
2017/24/ValtteriM/BallTag
Files:
3 added
17 edited

Legend:

Unmodified
Added
Removed
  • 2017/24/ValtteriM/BallTag/BallTag/BallTag/BallTag.cs

    r8495 r8530  
    1212    Image olionKuva = LoadImage("naapurileikattu"); 
    1313 
     14    PlatformCharacter bonnie; 
     15    Image olionKuva2 = LoadImage("bonnie"); 
    1416    public override void Begin() 
    1517    { 
     
    1719        luokentta(); 
    1820        luohamo(); 
     21        luohamo2(); 
    1922 
    2023        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    2124        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    2225 
    23         Keyboard.Listen(Key.L,ButtonState.Down, Liikuoikealle, "Liikuoikealle"); 
     26        Keyboard.Listen(Key.L, ButtonState.Down, Liikuoikealle, "Liikuoikealle",naapuri); 
     27        Keyboard.Listen(Key.J, ButtonState.Down, Liikuvasemmalle, "Liikuvasemmalle",naapuri); 
     28        Keyboard.Listen(Key.I, ButtonState.Pressed, hyppaa, "hyppaa",naapuri); 
    2429 
     30        Keyboard.Listen(Key.D, ButtonState.Down, Liikuoikealle, "Liikuoikealle",bonnie); 
     31        Keyboard.Listen(Key.A, ButtonState.Down, Liikuvasemmalle, "Liikuvasemmalle",bonnie); 
     32        Keyboard.Listen(Key.W, ButtonState.Pressed, hyppaa, "hyppaa",bonnie); 
    2533 
    2634 
     
    2836 
    2937    } 
    30     void Liikuoikealle() 
     38    void Liikuoikealle(PlatformCharacter hamo) 
    3139    { 
    32         naapuri.Walk(500.0); 
     40        hamo.Walk(500.0); 
     41    } 
     42    void Liikuvasemmalle(PlatformCharacter hamo) 
     43    { 
     44        hamo.Walk(-500.0); 
     45         
     46    } 
     47    void hyppaa(PlatformCharacter hamo) 
     48    { 
     49        hamo.Jump(750.0); 
    3350    } 
    3451 
    3552    void luokentta() 
    3653    { 
    37      TileMap ruudut = TileMap.FromLevelAsset("kentta1"); 
     54        TileMap ruudut = TileMap.FromLevelAsset("kentta1"); 
    3855        ruudut.SetTileMethod('#', LuoPalikka); 
    3956 
     
    5269    void luohamo() 
    5370    { 
    54         naapuri = new PlatformCharacter(100, 100); 
     71        naapuri = new PlatformCharacter(70, 70); 
    5572        naapuri.Image = olionKuva; 
    5673        Add(naapuri); 
    5774    } 
    58      
     75 
     76 
     77    void luohamo2() 
     78    { 
     79        bonnie = new PlatformCharacter(70, 70); 
     80        bonnie.Image = olionKuva2; 
     81        Add(bonnie); 
     82 
     83 
     84    } 
     85 
     86} 
     87         
     88 
     89         
    5990    
    60 } 
  • 2017/24/ValtteriM/BallTag/BallTag/BallTag/BallTag.csproj.Debug.cachefile

    r8495 r8530  
    11Content\naapurileikattu.xnb 
    22Content\kentta1.xnb 
     3Content\bonnie.xnb 
    34Content\kentta1.txt 
  • 2017/24/ValtteriM/BallTag/BallTag/BallTag/bin/x86/Debug/Content/kentta1.txt

    r8495 r8530  
    77#....................# 
    88#....................# 
     9#.............####...# 
     10#.....##......#..#...# 
     11#...........##....#..# 
    912#....................# 
    10 #......I.............# 
     13#....................# 
    1114###################### 
  • 2017/24/ValtteriM/BallTag/BallTag/BallTag/obj/x86/Debug/BallTag.csproj.FileListAbsolute.txt

    r8495 r8530  
    1010C:\MyTemp\ValtteriM\BallTag\BallTag\BallTag\bin\x86\Debug\Content\kentta1.xnb 
    1111C:\MyTemp\ValtteriM\BallTag\BallTag\BallTag\bin\x86\Debug\Content\kentta1.txt 
     12C:\MyTemp\ValtteriM\BallTag\BallTag\BallTag\bin\x86\Debug\Content\bonnie.xnb 
  • 2017/24/ValtteriM/BallTag/BallTag/BallTag/obj/x86/Debug/ContentPipeline-{136D9D65-D806-4D90-A790-28D798B0E25A}.xml

    r8495 r8530  
    99      <Options>None</Options> 
    1010      <Output>C:\MyTemp\ValtteriM\BallTag\BallTag\BallTag\bin\x86\Debug\Content\naapurileikattu.xnb</Output> 
    11       <Time>2017-06-12T10:34:22.7594918+03:00</Time> 
     11      <Time>2017-06-12T14:51:25.6694219+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\ValtteriM\BallTag\BallTag\BallTag\bin\x86\Debug\Content\kentta1.xnb</Output> 
    20       <Time>2017-06-12T11:49:26.3256536+03:00</Time> 
     20      <Time>2017-06-12T13:35:46.0163612+03:00</Time> 
     21    </Item> 
     22    <Item> 
     23      <Source>bonnie.png</Source> 
     24      <Name>bonnie</Name> 
     25      <Importer>TextureImporter</Importer> 
     26      <Processor>TextureProcessor</Processor> 
     27      <Options>None</Options> 
     28      <Output>C:\MyTemp\ValtteriM\BallTag\BallTag\BallTag\bin\x86\Debug\Content\bonnie.xnb</Output> 
     29      <Time>2017-06-12T14:51:21.6294484+03:00</Time> 
    2130    </Item> 
    2231    <BuildSuccessful>true</BuildSuccessful> 
  • 2017/24/ValtteriM/BallTag/BallTag/BallTag/obj/x86/Debug/cachefile-{136D9D65-D806-4D90-A790-28D798B0E25A}-targetpath.txt

    r8495 r8530  
    11Content\naapurileikattu.xnb 
    22Content\kentta1.xnb 
     3Content\bonnie.xnb 
    34Content\kentta1.txt 
  • 2017/24/ValtteriM/BallTag/BallTag/BallTagContent/BallTagContent.contentproj

    r8495 r8530  
    4646  </ItemGroup> 
    4747  <ItemGroup> 
    48     <Compile Include="naapurileikattu .png"> 
    49       <Name>naapurileikattu</Name> 
     48    <Compile Include="kentta1.txt"> 
     49      <Name>kentta1</Name> 
     50      <Importer>TextFileImporter</Importer> 
     51      <Processor>TextFileContentProcessor</Processor> 
     52      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
     53    </Compile> 
     54  </ItemGroup> 
     55  <ItemGroup> 
     56    <Compile Include="bonnie.png"> 
     57      <Name>bonnie</Name> 
    5058      <Importer>TextureImporter</Importer> 
    5159      <Processor>TextureProcessor</Processor> 
     
    5361  </ItemGroup> 
    5462  <ItemGroup> 
    55     <Compile Include="kentta1.txt"> 
    56       <Name>kentta1</Name> 
    57       <Importer>TextFileImporter</Importer> 
    58       <Processor>TextFileContentProcessor</Processor> 
    59       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
     63    <Compile Include="naapurileikattu .png"> 
     64      <Name>naapurileikattu</Name> 
     65      <Importer>TextureImporter</Importer> 
     66      <Processor>TextureProcessor</Processor> 
    6067    </Compile> 
    6168  </ItemGroup> 
  • 2017/24/ValtteriM/BallTag/BallTag/BallTagContent/kentta1.txt

    r8495 r8530  
    77#....................# 
    88#....................# 
     9#.............####...# 
     10#.....##......#..#...# 
     11#...........##....#..# 
    912#....................# 
    10 #......I.............# 
     13#....................# 
    1114###################### 
Note: See TracChangeset for help on using the changeset viewer.