Changeset 7574 for 2016/26


Ignore:
Timestamp:
2016-06-29 14:55:08 (3 years ago)
Author:
hesipone
Message:
 
Location:
2016/26/HennaS/Hyppelypeli
Files:
2 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/Hyppelypeli/Hyppelypeli.cs

    r7564 r7574  
    1717    Image pelaajanKuva = LoadImage("norsu"); 
    1818    Image tahtiKuva = LoadImage("tahti"); 
     19    Image timanttiKuva = LoadImage("SininenTimantti"); 
    1920 
    2021    SoundEffect maaliAani = LoadSoundEffect("maali"); 
     
    3738        kentta.SetTileMethod('#', LisaaTaso); 
    3839        kentta.SetTileMethod('*', LisaaTahti); 
     40        kentta.SetTileMethod('@', LisaaTimantti); 
    3941        kentta.SetTileMethod('N', LisaaPelaaja); 
     42        kentta.SetTileMethod('V', LisaaVaarallinenPalikka); 
    4043        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    4144        Level.CreateBorders(); 
     
    6164    } 
    6265 
     66    void LisaaTimantti(Vector paikka, double leveys, double korkeus) 
     67    { 
     68        PhysicsObject timantti = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     69        timantti.IgnoresCollisionResponse = true; 
     70        timantti.Position = paikka; 
     71        timantti.Image = timanttiKuva; 
     72        timantti.Tag = "timantti"; 
     73        Add(timantti); 
     74     
     75} 
     76 
    6377    void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 
    6478    { 
     
    6781        pelaaja1.Mass = 4.0; 
    6882        pelaaja1.Image = pelaajanKuva; 
    69         AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
     83        AddCollisionHandler(pelaaja1, "timantti", TormaaTimanttiin); 
     84        AddCollisionHandler(pelaaja1, "Vaarallinen", TormaaVaaralliseen); 
    7085        Add(pelaaja1); 
     86    } 
     87    void LisaaVaarallinenPalikka(Vector paikka, double leveys, double korkeus) 
     88    { 
     89        PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     90        taso.Position = paikka; 
     91        taso.Color = Color.Transparent; 
     92        taso.Tag = "Vaarallinen"; 
     93        Add(taso); 
    7194    } 
    7295 
     
    101124    } 
    102125 
    103     void TormaaTahteen(PhysicsObject hahmo, PhysicsObject tahti) 
     126    void TormaaTimanttiin(PhysicsObject hahmo, PhysicsObject tahti) 
    104127    { 
    105128        maaliAani.Play(); 
     
    107130        tahti.Destroy(); 
    108131    } 
     132    void TormaaVaaralliseen(PhysicsObject hahmo, PhysicsObject tahti) 
     133    { 
     134        ClearAll(); 
     135        Begin(); 
     136    } 
    109137} 
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/Hyppelypeli/Hyppelypeli.csproj.Debug.cachefile

    r7556 r7574  
    33Content\tahti.xnb 
    44Content\kentta1.xnb 
     5Content\SininenTimantti.xnb 
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/Hyppelypeli/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r7564 r7574  
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2016-06-29T11:22:21.7024136+03:00</Time> 
     38      <Time>2016-06-29T14:37:23.2026877+03:00</Time> 
     39    </Item> 
     40    <Item> 
     41      <Source>SininenTimantti.png</Source> 
     42      <Name>SininenTimantti</Name> 
     43      <Importer>TextureImporter</Importer> 
     44      <Processor>TextureProcessor</Processor> 
     45      <Options>None</Options> 
     46      <Output>C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\SininenTimantti.xnb</Output> 
     47      <Time>2016-06-29T14:31:32.2996155+03:00</Time> 
    3948    </Item> 
    4049    <BuildSuccessful>true</BuildSuccessful> 
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/Hyppelypeli/obj/x86/Debug/Hyppelypeli.csproj.FileListAbsolute.txt

    r7556 r7574  
    1111C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\obj\x86\Debug\Hyppelypeli.exe 
    1212C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\obj\x86\Debug\Hyppelypeli.pdb 
     13C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\SininenTimantti.xnb 
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/Hyppelypeli/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r7556 r7574  
    33Content\tahti.xnb 
    44Content\kentta1.xnb 
     5Content\SininenTimantti.xnb 
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/HyppelypeliContent/HyppelypeliContent.contentproj

    r7556 r7574  
    6767    </Compile> 
    6868  </ItemGroup> 
     69  <ItemGroup> 
     70    <Compile Include="SininenTimantti.png"> 
     71      <Name>SininenTimantti</Name> 
     72      <Importer>TextureImporter</Importer> 
     73      <Processor>TextureProcessor</Processor> 
     74    </Compile> 
     75  </ItemGroup> 
    6976  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    7077  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/HyppelypeliContent/kentta1.txt

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