Changeset 945
- Timestamp:
- 2010-06-17 13:30:33 (13 years ago)
- Location:
- 2010/24/kaosmaja/Tasohyppely1
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/24/kaosmaja/Tasohyppely1/Content/Content.contentproj
r929 r945 75 75 </Compile> 76 76 </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> 77 105 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 78 106 <!-- 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 10 10 double hyppyVoima = 7000; 11 11 12 int elamat = 3; 13 14 12 15 IntMeter pisteLaskuri; 13 16 ValueDisplay pisteNaytto; 14 17 15 18 PlatformCharacter pelaaja1; 19 20 Vector Aloituspaikka; 16 21 17 22 int kenttaNro; // monesko kenttä on menossa … … 55 60 { 56 61 LuoKentta2(); 62 } 63 if (kenttaNro == 3) 64 { 65 LuoKentta3(); 57 66 } 58 67 lisaaNappaimet(); … … 140 149 ruudut['@'] = lisaaPelaajat; 141 150 ruudut.Insert(ruudunLeveys, ruudunKorkeus); 151 Aloituspaikka = pelaaja1.Position; 142 152 Camera.Follow(pelaaja1); 143 153 } 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 } 144 170 PhysicsObject LuoSieni1() 145 171 { 146 172 PhysicsObject sieni1 = new PhysicsObject(25, 25); 147 sieni1.Image = LoadImage("Sieni 1");173 sieni1.Image = LoadImage("Sieni"); 148 174 sieni1.Tag = "sieni1"; 149 175 … … 154 180 { 155 181 PhysicsObject sieni2 = new PhysicsObject(25, 25); 156 sieni2.Image = LoadImage("Sieni 2");182 sieni2.Image = LoadImage("Sieni.p"); 157 183 sieni2.Tag = "sieni2"; 158 184 … … 334 360 335 361 } 362 336 363 if (otherObject.Tag.ToString() == "Teho") 337 364 { … … 348 375 //ValueDisplay aikanaytto; 349 376 } 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 //} 350 389 } 351 390 private void SKosketus(Timer sender)
Note: See TracChangeset
for help on using the changeset viewer.