Changeset 945


Ignore:
Timestamp:
2010-06-17 13:30:33 (13 years ago)
Author:
kaosmaja
Message:

kentta3 odotan

Location:
2010/24/kaosmaja/Tasohyppely1
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2010/24/kaosmaja/Tasohyppely1/Content/Content.contentproj

    r929 r945  
    7575    </Compile> 
    7676  </ItemGroup> 
     77  <ItemGroup> 
     78    <Compile Include="Sieni.p.png"> 
     79      <Name>Sieni.p</Name> 
     80      <Importer>TextureImporter</Importer> 
     81      <Processor>TextureProcessor</Processor> 
     82    </Compile> 
     83  </ItemGroup> 
     84  <ItemGroup> 
     85    <Compile Include="sieni.png"> 
     86      <Name>sieni</Name> 
     87      <Importer>TextureImporter</Importer> 
     88      <Processor>TextureProcessor</Processor> 
     89    </Compile> 
     90  </ItemGroup> 
     91  <ItemGroup> 
     92    <Compile Include="boss2.png"> 
     93      <Name>boss2</Name> 
     94      <Importer>TextureImporter</Importer> 
     95      <Processor>TextureProcessor</Processor> 
     96    </Compile> 
     97  </ItemGroup> 
     98  <ItemGroup> 
     99    <Compile Include="boss1.png"> 
     100      <Name>boss1</Name> 
     101      <Importer>TextureImporter</Importer> 
     102      <Processor>TextureProcessor</Processor> 
     103    </Compile> 
     104  </ItemGroup> 
    77105  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    78106  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2010/24/kaosmaja/Tasohyppely1/Peli.cs

    r937 r945  
    1010    double hyppyVoima = 7000; 
    1111 
     12    int elamat = 3; 
     13 
     14 
    1215    IntMeter pisteLaskuri; 
    1316    ValueDisplay pisteNaytto; 
    1417 
    1518    PlatformCharacter pelaaja1; 
     19 
     20    Vector Aloituspaikka; 
    1621 
    1722    int kenttaNro; // monesko kenttä on menossa 
     
    5560        { 
    5661            LuoKentta2(); 
     62        } 
     63        if (kenttaNro == 3) 
     64        { 
     65            LuoKentta3(); 
    5766        } 
    5867        lisaaNappaimet(); 
     
    140149        ruudut['@'] = lisaaPelaajat; 
    141150        ruudut.Insert(ruudunLeveys, ruudunKorkeus); 
     151        Aloituspaikka = pelaaja1.Position; 
    142152        Camera.Follow(pelaaja1); 
    143153    } 
     154    void LuoKentta3() 
     155    { 
     156        TileMap ruudut = TileMap.FromFile("kentta3.txt"); 
     157        ruudut['='] = LuoPalikka; 
     158        ruudut['*'] = LuoSmiley2; 
     159        ruudut['S'] = LuoS; 
     160        ruudut['V'] = LuoSieni1; 
     161        ruudut['v'] = LuoSieni2; 
     162        ruudut['B'] = LuoBoss1; 
     163        ruudut['b'] = LuoBoss2; 
     164        ruudut['!'] = lisaaMaali; 
     165        ruudut['@'] = lisaaPelaajat; 
     166        ruudut.Insert(ruudunLeveys, ruudunKorkeus); 
     167        Aloituspaikka = pelaaja1.Position; 
     168        Camera.Follow(pelaaja1); 
     169    } 
    144170    PhysicsObject LuoSieni1() 
    145171    { 
    146172        PhysicsObject sieni1 = new PhysicsObject(25, 25); 
    147         sieni1.Image = LoadImage("Sieni1"); 
     173        sieni1.Image = LoadImage("Sieni"); 
    148174        sieni1.Tag = "sieni1"; 
    149175 
     
    154180    { 
    155181        PhysicsObject sieni2 = new PhysicsObject(25, 25); 
    156         sieni2.Image = LoadImage("Sieni2"); 
     182        sieni2.Image = LoadImage("Sieni.p"); 
    157183        sieni2.Tag = "sieni2"; 
    158184 
     
    334360 
    335361        } 
     362 
    336363        if (otherObject.Tag.ToString() == "Teho") 
    337364        { 
     
    348375            //ValueDisplay aikanaytto; 
    349376        } 
     377        if (otherObject.Tag.ToString() == "Pelaaja1") 
     378        { 
     379            MessageDisplay.Add("Too Bad..."); 
     380            pelaaja1.Position = Aloituspaikka; 
     381            elamat--; 
     382        } 
     383        //if (elamat == -1) 
     384        //{ 
     385        //    MessageDisplay.Add("Peli Loppui..."); 
     386        //    ClearAll; 
     387        //    Exit; 
     388        //} 
    350389    } 
    351390    private void SKosketus(Timer sender) 
Note: See TracChangeset for help on using the changeset viewer.