Changeset 6106
- Timestamp:
- 2015-06-15 17:54:01 (8 years ago)
- Location:
- 2015/24/ohjaajat/Dungeon/Dungeon
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/24/ohjaajat/Dungeon/Dungeon/Dungeon/Dungeon.cs
r6104 r6106 34 34 public int Price { get; set; } 35 35 36 public SoundEffect HajotusAani { get; set; } 37 36 38 protected Upgrade() 37 39 : base(Dungeon.RUUDUN_KOKO, Dungeon.RUUDUN_KOKO) … … 139 141 this.Destroy(); 140 142 huone.Upgrade = null; 143 if (HajotusAani != null) 144 { 145 HajotusAani.Play(); 146 } 141 147 if (peli.KultuuriHuoneidenPaikat().Count < 1) 142 148 { … … 227 233 #endregion 228 234 235 private SoundEffect[] hajotusAanet = { LoadSoundEffect("fountainbreak"), LoadSoundEffect("boom"), LoadSoundEffect("piano2") }; 236 229 237 int[] hinnat = { 75, 200, 300, 100 }; 230 238 int[] vahingot = { 1, 2 }; … … 310 318 ansaAnimaatiot.Add(new Animation(murskausAnsaKuvat)); 311 319 menu = new MainMenu(this, "New game", "Highscores", "Help", "Quit"); 312 menu.Painikkeet[0].Clicked += AloitaPeli; 320 menu.Painikkeet[0].Clicked += delegate 321 { 322 AloitaPeli(); 323 menu = null; 324 }; 313 325 menu.Painikkeet[3].Clicked += Exit; 314 326 } … … 413 425 kuva.Clicked += delegate 414 426 { 415 ostamassa = LuoKultuuriPaivitys(kultuuriKuvat[indeksi], hinnat[indeksi], kultuuriTuotot[indeksi] ); // TODO: tuotto[indeksi]427 ostamassa = LuoKultuuriPaivitys(kultuuriKuvat[indeksi], hinnat[indeksi], kultuuriTuotot[indeksi], hajotusAanet[indeksi]); // TODO: tuotto[indeksi] 416 428 }; 417 429 … … 486 498 } 487 499 488 Upgrade LuoKultuuriPaivitys(Image[] kuvat, int hinta, int kultuuriMaara )500 Upgrade LuoKultuuriPaivitys(Image[] kuvat, int hinta, int kultuuriMaara, SoundEffect hajotusAani) 489 501 { 490 502 var upg = new CultureUpgrade(); 503 upg.HajotusAani = hajotusAani; 491 504 upg.Image = kuvat[0]; 492 505 upg.Size = new Vector(0.7, 0.7)*RUUDUN_KOKO; -
2015/24/ohjaajat/Dungeon/Dungeon/DungeonContent/DungeonContent.contentproj
r6104 r6106 390 390 </Compile> 391 391 </ItemGroup> 392 <ItemGroup> 393 <Compile Include="boom.wav"> 394 <Name>boom</Name> 395 <Importer>WavImporter</Importer> 396 <Processor>SoundEffectProcessor</Processor> 397 </Compile> 398 </ItemGroup> 399 <ItemGroup> 400 <Compile Include="fountainbreak.wav"> 401 <Name>fountainbreak</Name> 402 <Importer>WavImporter</Importer> 403 <Processor>SoundEffectProcessor</Processor> 404 </Compile> 405 </ItemGroup> 406 <ItemGroup> 407 <Compile Include="piano2.wav"> 408 <Name>piano2</Name> 409 <Importer>WavImporter</Importer> 410 <Processor>SoundEffectProcessor</Processor> 411 </Compile> 412 </ItemGroup> 392 413 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 393 414 <!-- 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.