Changeset 4722 for 2013/30


Ignore:
Timestamp:
2013-07-26 12:14:37 (6 years ago)
Author:
jeattama
Message:

Talletus.

Location:
2013/30/JesseM/alone in the dark
Files:
1 added
14 edited

Legend:

Unmodified
Added
Removed
  • 2013/30/JesseM/alone in the dark/alone in the dark/alone in the dark/alone in the dark.csproj.Debug.cachefile

    r4675 r4722  
    77Content\kauhu.xnb 
    88Content\ovi.xnb 
     9Content\avain.xnb 
     10Content\lattia.xnb 
    911Content\kauhu.wma 
  • 2013/30/JesseM/alone in the dark/alone in the dark/alone in the dark/alone_in_the_dark.cs

    r4675 r4722  
    1414    Image kentankuva = LoadImage("musta"); 
    1515    Image ovenkuva = LoadImage("ovi"); 
     16    Image avainkuva = LoadImage("avain"); 
     17    Image lattia = LoadImage("lattia"); 
    1618    PhysicsObject pelaaja; 
    1719    Widget varjo; 
     
    1921    double nopeus = 500; 
    2022    double juoksuNopKerroin = 1.5; 
    21  
     23    int avaimia; 
    2224    const int RUUDUN_KOKO = 20; 
    2325 
     
    4850        ruudut.SetTileMethod("FF006E", LuoPelaaja); 
    4951        ruudut.SetTileMethod("FFF314", LuoHirvio); 
     52        ruudut.SetTileMethod("FF7FB6", LuoAvain); 
     53        ruudut.SetTileMethod("FF0015", LuoPaaovi); 
    5054        ruudut.Optimize(Color.Black); 
    5155        ruudut.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    52         Level.BackgroundColor = Color.Gray; 
     56        Level.Background.Image = LoadImage("lattia"); 
     57        Level.Background.TileToLevel(); 
    5358        //Camera.ZoomToLevel(); 
    5459        Camera.Follow(pelaaja); 
     
    6873        Add(taso); 
    6974    } 
     75 
     76    void LuoPaaovi(Vector paikka, Double leveys, Double korkeus) 
     77    { 
     78        PhysicsObject Paaovi = PhysicsObject.CreateStaticObject(20, 20); 
     79        Paaovi.Position = paikka; 
     80        Paaovi.Color = Color.Red; 
     81        Paaovi.CollisionIgnoreGroup = 1; 
     82        Paaovi.Tag = "paaovi"; 
     83        Add(Paaovi); 
     84    } 
     85 
     86    void LuoAvain(Vector paikka, Double leveys, Double korkeus) 
     87    { 
     88    PhysicsObject avain = PhysicsObject.CreateStaticObject(9, 5); 
     89     
     90    avain.Position = paikka; 
     91    avain.Image = avainkuva; 
     92    avain.Color = Color.Pink; 
     93    avain.CollisionIgnoreGroup = 1; 
     94    avain.Tag = "avain"; 
     95 
     96    Add(avain); 
     97 
     98    } 
     99 
    70100 
    71101    void LuoOvi(Vector paikka, Double leveys, Double korkeus) 
     
    95125        pelaaja.Tag = "pelaaja"; 
    96126        LuoNappaimet(pelaaja); 
     127        AddCollisionHandler(pelaaja, "paaovi", pelaajaavaaoven); 
     128        AddCollisionHandler(pelaaja, "avain", Pelaajakeraaavaimen); 
    97129        AddCollisionHandler(pelaaja, "hirviö", PelaajaOsuu); 
    98130        
    99131 
    100132    } 
     133 
     134    void pelaajaavaaoven(PhysicsObject tormaaja, PhysicsObject kohde) 
     135    { 
     136        if (avaimia >= 5) 
     137        { 
     138            MessageWindow viesti = new MessageWindow("Victory"); 
     139            Add(viesti); 
     140        } 
     141    } 
     142 
     143    void Pelaajakeraaavaimen(PhysicsObject tormaaja, PhysicsObject kohde) 
     144    { 
     145        avaimia++; 
     146        kohde.Destroy(); 
     147    } 
     148 
     149 
    101150 
    102151 
     
    168217    void PelaajaOsuu(PhysicsObject pelaaja, PhysicsObject kohde) 
    169218    { 
     219        MessageWindow viesti = new MessageWindow("Game over"); 
     220        viesti.Closed += aloitauusipeli; 
     221        Add(viesti); 
     222    } 
     223 
     224    void aloitauusipeli(Window ikkuna) 
     225    { 
    170226        ClearAll(); 
    171227        Begin(); 
  • 2013/30/JesseM/alone in the dark/alone in the dark/alone in the dark/obj/x86/Debug/alone in the dark.csproj.FileListAbsolute.txt

    r4675 r4722  
    1616C:\MyTemp\JesseM\alone in the dark\alone in the dark\alone in the dark\bin\x86\Debug\Content\kauhu.wma 
    1717C:\MyTemp\JesseM\alone in the dark\alone in the dark\alone in the dark\bin\x86\Debug\Content\ovi.xnb 
     18C:\MyTemp\JesseM\alone in the dark\alone in the dark\alone in the dark\bin\x86\Debug\Content\avain.xnb 
     19C:\MyTemp\JesseM\alone in the dark\alone in the dark\alone in the dark\bin\x86\Debug\Content\lattia.xnb 
  • 2013/30/JesseM/alone in the dark/alone in the dark/alone in the dark/obj/x86/Debug/cachefile-{7B65F46B-673A-4E6A-9D77-E5D9E2C2F346}-targetpath.txt

    r4675 r4722  
    88Content\kauhu.wma 
    99Content\ovi.xnb 
     10Content\avain.xnb 
     11Content\lattia.xnb 
  • 2013/30/JesseM/alone in the dark/alone in the dark/alone in the darkContent/alone in the darkContent.contentproj

    r4675 r4722  
    101101    </Compile> 
    102102  </ItemGroup> 
     103  <ItemGroup> 
     104    <Compile Include="avain.png"> 
     105      <Name>avain</Name> 
     106      <Importer>TextureImporter</Importer> 
     107      <Processor>TextureProcessor</Processor> 
     108    </Compile> 
     109  </ItemGroup> 
     110  <ItemGroup> 
     111    <Compile Include="lattia.png"> 
     112      <Name>lattia</Name> 
     113      <Importer>TextureImporter</Importer> 
     114      <Processor>TextureProcessor</Processor> 
     115    </Compile> 
     116  </ItemGroup> 
    103117  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    104118  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2013/30/JesseM/alone in the dark/alone in the dark/alone in the darkContent/obj/x86/Debug/ContentPipeline.xml

    r4675 r4722  
    99      <Options>None</Options> 
    1010      <Output>C:\MyTemp\JesseM\alone in the dark\alone in the dark\alone in the dark\bin\x86\Debug\Content\Untitled.xnb</Output> 
    11       <Time>2013-07-25T15:02:06.1398032+03:00</Time> 
     11      <Time>2013-07-26T10:52:08.7594027+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    5454      <Options>None</Options> 
    5555      <Output>C:\MyTemp\JesseM\alone in the dark\alone in the dark\alone in the dark\bin\x86\Debug\Content\musta.xnb</Output> 
    56       <Time>2013-07-25T14:06:47.2778032+03:00</Time> 
     56      <Time>2013-07-25T15:03:08.9598032+03:00</Time> 
    5757    </Item> 
    5858    <Item> 
     
    7474      <Output>C:\MyTemp\JesseM\alone in the dark\alone in the dark\alone in the dark\bin\x86\Debug\Content\ovi.xnb</Output> 
    7575      <Time>2013-07-25T14:52:50.8068032+03:00</Time> 
     76    </Item> 
     77    <Item> 
     78      <Source>avain.png</Source> 
     79      <Name>avain</Name> 
     80      <Importer>TextureImporter</Importer> 
     81      <Processor>TextureProcessor</Processor> 
     82      <Options>None</Options> 
     83      <Output>C:\MyTemp\JesseM\alone in the dark\alone in the dark\alone in the dark\bin\x86\Debug\Content\avain.xnb</Output> 
     84      <Time>2013-07-25T15:03:12.0158032+03:00</Time> 
     85    </Item> 
     86    <Item> 
     87      <Source>lattia.png</Source> 
     88      <Name>lattia</Name> 
     89      <Importer>TextureImporter</Importer> 
     90      <Processor>TextureProcessor</Processor> 
     91      <Options>None</Options> 
     92      <Output>C:\MyTemp\JesseM\alone in the dark\alone in the dark\alone in the dark\bin\x86\Debug\Content\lattia.xnb</Output> 
     93      <Time>2013-07-26T11:42:56.2851248+03:00</Time> 
    7694    </Item> 
    7795    <BuildSuccessful>true</BuildSuccessful> 
Note: See TracChangeset for help on using the changeset viewer.