Changeset 4457
- Timestamp:
- 2013-07-05 10:46:14 (10 years ago)
- Location:
- 2013/27/AkseliJ/Levypallo/Levypallo
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/27/AkseliJ/Levypallo/Levypallo/Levypallo/Levypallo.cs
r4431 r4457 41 41 elamat = 3; 42 42 ValmisteleTausta(); 43 MediaPlayer.Play("loverush"); 44 MediaPlayer.IsRepeating = true; 43 45 LuoPallo(); 44 46 AsetaFysiikkaKuuntelijat(); … … 154 156 } 155 157 } 156 if (taso >= 4) {158 if (taso >= 2) { 157 159 158 160 Label l = new Label(600, 400, "Onneksi olkoon!\nLäpäisit pelin!"); … … 207 209 if (levy.Left - 5 < Level.Left) ; 208 210 else 209 levy.Velocity = new Vector(- 400, 0);211 levy.Velocity = new Vector(-380, 0); 210 212 return; 211 213 … … 215 217 216 218 if (levy.Right > Level.Right) ; 219 217 220 else 218 221 { 219 levy.Velocity = new Vector( 400, 0);222 levy.Velocity = new Vector(380, 0); 220 223 return; 221 224 } … … 230 233 if (nappi == Key.Space && palloKiinni) 231 234 { 232 palloKiinni = false; +235 palloKiinni = false; 233 236 pallo.IgnoresCollisionResponse = false; 234 237 bool rnd = RandomGen.NextBool(); … … 239 242 { 240 243 241 /*palloKiinni = true;244 palloKiinni = true; 242 245 //pallo.X = levy.X; 243 246 pallo.Y = Level.Bottom + 70; 244 247 pallo.IgnoresCollisionResponse = true; 245 elamat--; */246 Label l = new Label(600, 400, "Onneksi olkoon!\nLäpäisit pelin!");248 elamat--; 249 /*Label l = new Label(600, 400, "Onneksi olkoon!\nLäpäisit pelin!"); 247 250 l.TextScale = new Vector(6, 6); 248 251 l.TextColor = Color.Pink; 249 252 Add(l); 250 253 MessageDisplay.Add(ArvioiTulos()); 251 Pause(); 254 Pause();*/ 252 255 253 256 } … … 323 326 324 327 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 325 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 328 Keyboard.Listen(Key.Escape, ButtonState.Pressed, VarmistaPoistuminenPausella, "Lopeta peli"); 329 330 } 331 332 void VarmistaPoistuminenPausella() 333 { 334 this.IsPaused = true; 335 MediaPlayer.Stop(); 336 337 MultiSelectWindow ikkuna = new MultiSelectWindow("Lopetetaanko?", "Kyllä", "Ei"); 338 ikkuna.AddItemHandler(0, Exit); 339 ikkuna.AddItemHandler(1, delegate { MediaPlayer.Resume(); this.IsPaused = false; }); 340 Add(ikkuna); 326 341 327 342 } -
2013/27/AkseliJ/Levypallo/Levypallo/LevypalloContent/LevypalloContent.contentproj
r4431 r4457 59 59 </Compile> 60 60 </ItemGroup> 61 <ItemGroup> 62 <Compile Include="loverush.mp3"> 63 <Name>loverush</Name> 64 <Importer>Mp3Importer</Importer> 65 <Processor>SongProcessor</Processor> 66 </Compile> 67 </ItemGroup> 61 68 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 62 69 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset
for help on using the changeset viewer.