Changeset 655
- Timestamp:
- 2010-06-10 11:41:37 (13 years ago)
- Location:
- 2010/23/Kavaisan/Tasohyppely1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/23/Kavaisan/Tasohyppely1/Peli.cs
r630 r655 25 25 protected override void Begin() 26 26 { 27 kenttaNro = 0;27 kenttaNro = 1; 28 28 Level.Width = 2000; 29 29 Level.Height = 1000; … … 52 52 { 53 53 ClearAll(); 54 pisteLaskuri.Reset(); 55 56 kenttaNro += 1; // lisätään kenttänumeroa yhdellä 57 MessageDisplay.Add("Kenttä " + kenttaNro); 54 pisteLaskuri.Reset(); 58 55 59 56 // Asetetaan painovoima … … 61 58 62 59 luoKentta(); 60 kenttaNro++; 61 if (kenttaNro > 2) kenttaNro = 1; 62 63 63 lisaaNappaimet(); 64 64 Camera.Follow(pelaaja1); … … 76 76 77 77 char[,] ruudut = null; 78 if (2 == kenttaNro)79 {80 ruudut = Tiles.ReadFromFile("kentta.txt");81 }82 78 83 if (1 == kenttaNro) 84 { 85 ruudut = Tiles.ReadFromFile("TextFile1.txt"); 86 } 79 ruudut = Tiles.ReadFromFile("kentta"+kenttaNro+".txt"); 87 80 88 81 … … 146 139 Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 147 140 Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Poistu pelistä"); 141 Keyboard.Listen (Key.Enter, ButtonState.Pressed, seuraavaKentta, "AloitaAlusta"); 148 142 149 143 Keyboard.Listen(Key.Left, ButtonState.Down, liikuta, "Liikkuu vasemmalle", pelaaja1, -nopeus); … … 179 173 this.PlaySound("maali"); 180 174 int edellisenKentanPisteet = pisteLaskuri.Value; 175 kenttaNro = +1; 176 181 177 seuraavaKentta(); 182 178 MessageDisplay.Add("Pääsit läpi kentän " + kenttaNro + ". Pisteitä: " + edellisenKentanPisteet); … … 191 187 Add(e); 192 188 otherObject.Destroy(); 189 193 190 194 191 } 195 192 193 196 194 } 195 196 197 197 } 198 198 } -
2010/23/Kavaisan/Tasohyppely1/Tasohyppely1.csproj
r630 r655 89 89 <Content Include="Game.ico" /> 90 90 <Content Include="GameThumbnail.png" /> 91 <Content Include="kentta .txt">91 <Content Include="kentta1.txt"> 92 92 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 93 93 </Content> 94 <Content Include=" TextFile1.txt">94 <Content Include="kentta2.txt"> 95 95 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 96 96 </Content>
Note: See TracChangeset
for help on using the changeset viewer.