Changeset 3805
- Timestamp:
- 2012-07-27 12:20:58 (11 years ago)
- Location:
- 2012/30/ArttuP/NarutoVSsasuke/NarutoVSsasuke
- Files:
-
- 45 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/30/ArttuP/NarutoVSsasuke/NarutoVSsasuke/NarutoVSsasuke/NarutoVSsasuke.cs
r3767 r3805 12 12 const double hyppyNopeus = 750; 13 13 const int RUUDUN_KOKO = 40; 14 SoundEffect hyppyaani=LoadSoundEffect("Naruto_jump_air"); 14 15 15 16 PlatformCharacter pelaaja1; … … 20 21 Image[] Pelaaja1combo = LoadImages("combo 1", "combo 2", "combo 3"); 21 22 SoundEffect maaliAani = LoadSoundEffect("maali"); 23 SoundEffect lyontiaani = LoadSoundEffect("Naruto_jump_air2"); 24 SoundEffect superaaniNaruto = LoadSoundEffect("Naruto_monument_shock"); 25 SoundEffect superaaniSasuke= LoadSoundEffect("Naruto_monument_shock2"); 22 26 PlatformCharacter pelaaja2; 23 27 Image[] Kavelykuvat2 = LoadImages("Juoksu B","Juoksu B 2"); … … 26 30 Image hyppykuvat2 = LoadImage("hyppy B"); 27 31 Image[] Rasengan = new Image[29]; // = LoadImages("rasengan1", "rasengan3", "rasengan2", "rasengan", "rasengan", ); 32 Image[] Chidori = new Image[17]; 28 33 IntMeter P1elama = new IntMeter(50, 0, 50); 29 34 IntMeter P2elama = new IntMeter(50, 0, 50); … … 36 41 public override void Begin() 37 42 { 43 for (int i = 1; i <= 17; i++) 44 { 45 Chidori[i - 1] = LoadImage("chidori " + i); 46 } 38 47 for (int i = 1; i <= 29; i++) 39 48 { 40 49 Rasengan[i-1] = LoadImage("rasengan" + i); 50 41 51 } 42 52 … … 47 57 { 48 58 ClearAll(); 59 MediaPlayer.Play("Naruto Shippuden Ultimate Ninja Storm 2 - The Beast Set Loose Soundtrack"); 49 60 MultiSelectWindow alkuValikko = new MultiSelectWindow("Pelin alkuvalikko", 50 61 "Aloita peli", "Lopeta"); … … 99 110 Pallo.X = RandomGen.NextDouble(Level.Left, Level.Right); 100 111 Pallo.Y = RandomGen.NextDouble(Level.Bottom, Level.Top); 101 Pallo. Image = palloKuva;102 Pallo. Tag = "pallo";112 Pallo.Shape = Shape.Circle; 113 Pallo.Color = Color.LightBlue; Pallo.Tag = "pallo"; 103 114 Add(Pallo); 115 Pallo.IgnoresGravity = true; 104 116 105 117 Timer ajastin = new Timer(); 106 ajastin.Interval = 5;118 ajastin.Interval = 15; 107 119 ajastin.Timeout += delegate { Pallo.Destroy(); }; 108 120 ajastin.Start(); … … 156 168 kentta.SetTileMethod('S', LisaaPelaaja2); 157 169 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 158 Level.CreateBorders(); 170 Surfaces reunat = Level.CreateBorders(); 171 reunat.Bottom.Color = Color.Black; 172 reunat.Top.Color = Color.Black; 173 reunat.Left.Color = Color.Black; 174 reunat.Right.Color = Color.Black; 159 175 Level.Background.Image = Taustakuva; 160 176 Level.Background.FitToLevel(); … … 219 235 ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); 220 236 221 //ControllerOne.Listen(Button.DPadLeft, ButtonState.Down, Liikuta, "Pelaaja liikkuu vasemmalle", pelaaja1, -nopeus); 222 //ControllerOne.Listen(Button.DPadRight, ButtonState.Down, Liikuta, "Pelaaja liikkuu oikealle", pelaaja1, nopeus); 237 223 238 ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 224 239 ControllerOne.Listen(Button.B, ButtonState.Pressed, Isku, "lyo vastustajaa", pelaaja1); … … 228 243 ControllerTwo.Listen(Button.B, ButtonState.Pressed, Isku, "lyo vastustajaa", pelaaja2); 229 244 ControllerTwo.ListenAnalog(AnalogControl.LeftStick, 0.1, LiikutaTatilla, "Liikuta pelaajaa tattia pyörittämällä.", pelaaja2, nopeus); 245 ControllerTwo.Listen(Button.Y, ButtonState.Pressed, SuperIsku, "Tee superisku (kun mittari on täynnä)", pelaaja2); 230 246 231 247 } … … 233 249 { 234 250 Animation iskuanimaatio; 251 lyontiaani.Play(); 235 252 236 253 PlatformCharacter vastustaja; … … 251 268 PhysicsObject alue; 252 269 alue = new PhysicsObject(15, 15); 270 alue.Color = Color.Transparent; 253 271 alue.Position = pelaaja.Position+pelaaja.FacingDirection.GetVector()*50; 254 272 Add(alue); … … 306 324 307 325 Animation iskuanimaatio; 326 superaaniNaruto.Play(); 308 327 PlatformCharacter vastustaja; 309 328 … … 319 338 if (P2energia.Value != 5) return; 320 339 P2energia.Value = 0; 321 iskuanimaatio = new Animation(Pelaaja2combo); 340 iskuanimaatio = new Animation(Chidori); 341 superaaniSasuke.Play(); 322 342 vastustaja = pelaaja1; 323 343 } … … 330 350 iskuanimaatio.Played += delegate { pelaaja.Width = RUUDUN_KOKO; pelaaja.Height = RUUDUN_KOKO; }; 331 351 352 332 353 PhysicsObject alue; 333 354 alue = new PhysicsObject(40, 40); 355 alue.Color = Color.Transparent; 334 356 alue.Position = pelaaja.Position + pelaaja.FacingDirection.GetVector() * 50; 335 357 Add(alue); … … 357 379 void Hyppaa(PlatformCharacter hahmo, double nopeus) 358 380 { 381 hyppyaani.Play(); 359 382 hahmo.Jump(nopeus); 360 383 } -
2012/30/ArttuP/NarutoVSsasuke/NarutoVSsasuke/NarutoVSsasukeContent/NarutoVSsasukeContent.contentproj
r3767 r3805 354 354 </Compile> 355 355 </ItemGroup> 356 <ItemGroup> 357 <Compile Include="chidori 1.png"> 358 <Name>chidori 1</Name> 359 <Importer>TextureImporter</Importer> 360 <Processor>TextureProcessor</Processor> 361 </Compile> 362 <Compile Include="chidori 10.png"> 363 <Name>chidori 10</Name> 364 <Importer>TextureImporter</Importer> 365 <Processor>TextureProcessor</Processor> 366 </Compile> 367 <Compile Include="chidori 11.png"> 368 <Name>chidori 11</Name> 369 <Importer>TextureImporter</Importer> 370 <Processor>TextureProcessor</Processor> 371 </Compile> 372 <Compile Include="chidori 12.png"> 373 <Name>chidori 12</Name> 374 <Importer>TextureImporter</Importer> 375 <Processor>TextureProcessor</Processor> 376 </Compile> 377 <Compile Include="chidori 13.png"> 378 <Name>chidori 13</Name> 379 <Importer>TextureImporter</Importer> 380 <Processor>TextureProcessor</Processor> 381 </Compile> 382 <Compile Include="chidori 14.png"> 383 <Name>chidori 14</Name> 384 <Importer>TextureImporter</Importer> 385 <Processor>TextureProcessor</Processor> 386 </Compile> 387 <Compile Include="chidori 15.png"> 388 <Name>chidori 15</Name> 389 <Importer>TextureImporter</Importer> 390 <Processor>TextureProcessor</Processor> 391 </Compile> 392 <Compile Include="chidori 16.png"> 393 <Name>chidori 16</Name> 394 <Importer>TextureImporter</Importer> 395 <Processor>TextureProcessor</Processor> 396 </Compile> 397 <Compile Include="chidori 17.png"> 398 <Name>chidori 17</Name> 399 <Importer>TextureImporter</Importer> 400 <Processor>TextureProcessor</Processor> 401 </Compile> 402 <Compile Include="chidori 2.png"> 403 <Name>chidori 2</Name> 404 <Importer>TextureImporter</Importer> 405 <Processor>TextureProcessor</Processor> 406 </Compile> 407 <Compile Include="chidori 3.png"> 408 <Name>chidori 3</Name> 409 <Importer>TextureImporter</Importer> 410 <Processor>TextureProcessor</Processor> 411 </Compile> 412 <Compile Include="chidori 4.png"> 413 <Name>chidori 4</Name> 414 <Importer>TextureImporter</Importer> 415 <Processor>TextureProcessor</Processor> 416 </Compile> 417 <Compile Include="chidori 5.png"> 418 <Name>chidori 5</Name> 419 <Importer>TextureImporter</Importer> 420 <Processor>TextureProcessor</Processor> 421 </Compile> 422 <Compile Include="chidori 6.png"> 423 <Name>chidori 6</Name> 424 <Importer>TextureImporter</Importer> 425 <Processor>TextureProcessor</Processor> 426 </Compile> 427 <Compile Include="chidori 7.png"> 428 <Name>chidori 7</Name> 429 <Importer>TextureImporter</Importer> 430 <Processor>TextureProcessor</Processor> 431 </Compile> 432 <Compile Include="chidori 8.png"> 433 <Name>chidori 8</Name> 434 <Importer>TextureImporter</Importer> 435 <Processor>TextureProcessor</Processor> 436 </Compile> 437 <Compile Include="chidori 9.png"> 438 <Name>chidori 9</Name> 439 <Importer>TextureImporter</Importer> 440 <Processor>TextureProcessor</Processor> 441 </Compile> 442 </ItemGroup> 443 <ItemGroup> 444 <Compile Include="Naruto Shippuden Ultimate Ninja Storm 2 - The Beast Set Loose Soundtrack.mp3"> 445 <Name>Naruto Shippuden Ultimate Ninja Storm 2 - The Beast Set Loose Soundtrack</Name> 446 <Importer>Mp3Importer</Importer> 447 <Processor>SongProcessor</Processor> 448 </Compile> 449 </ItemGroup> 450 <ItemGroup> 451 <Compile Include="Naruto_jump_air.wav"> 452 <Name>Naruto_jump_air</Name> 453 <Importer>WavImporter</Importer> 454 <Processor>SoundEffectProcessor</Processor> 455 </Compile> 456 <Compile Include="Naruto_jump_air2.wav"> 457 <Name>Naruto_jump_air2</Name> 458 <Importer>WavImporter</Importer> 459 <Processor>SoundEffectProcessor</Processor> 460 </Compile> 461 </ItemGroup> 462 <ItemGroup> 463 <Compile Include="Naruto_monument_shock.wav"> 464 <Name>Naruto_monument_shock</Name> 465 <Importer>WavImporter</Importer> 466 <Processor>SoundEffectProcessor</Processor> 467 </Compile> 468 <Compile Include="Naruto_monument_shock2.wav"> 469 <Name>Naruto_monument_shock2</Name> 470 <Importer>WavImporter</Importer> 471 <Processor>SoundEffectProcessor</Processor> 472 </Compile> 473 </ItemGroup> 356 474 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 357 475 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2012/30/ArttuP/NarutoVSsasuke/NarutoVSsasuke/NarutoVSsasukeContent/kentta1.txt
r3767 r3805 4 4 5 5 ######### ######## 6 7 #### 8 #### #####6 ### 7 #### 8 #### ### 9 9 10 #### ##### 11 #### 12 #### 10 #### 11 ### 12 #### 13 #### 13 14 #### 14 #### 15 #### #### 15 16 16 17 #### #### 17 18 18 #### ### 19 #### ##### ##### 19 20 20 21 N S
Note: See TracChangeset
for help on using the changeset viewer.