- Timestamp:
- 2012-07-03 14:45:01 (11 years ago)
- Location:
- 2012/26/VilleS
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/26/VilleS/Garden_Run/Garden_Run/Garden_Run/Garden_Run.cs
r3363 r3486 9 9 public class Garden_Run : PhysicsGame 10 10 { 11 const double nopeus = 250;11 const double nopeus = 10000; 12 12 const double hyppyNopeus = 1000; 13 13 const int RUUDUN_KOKO = 100; -
2012/26/VilleS/TasoKokeiluJuttu/TasoKokeiluJuttu/TasoKokeiluJuttu/TasoKokeiluJuttu.cs
r3441 r3486 16 16 17 17 Image pelaajanKuva = LoadImage("AjLautailee"); 18 Image tahtiKuva = LoadImage("tahti"); 18 Image tahtiKuva = LoadImage("es"); 19 Image make = LoadImage("Make"); 19 20 21 SoundEffect hyppyAani = LoadSoundEffect("my_movie"); 20 22 SoundEffect maaliAani = LoadSoundEffect("maali"); 23 SoundEffect kuolemaAani = LoadSoundEffect("die_sound_effect"); 24 25 TimeSpan aanenAloitusAika = TimeSpan.MaxValue; 21 26 22 27 public override void Begin() … … 37 42 kentta.SetTileMethod(new Color(0,255,0), LisaaPelaaja); 38 43 kentta.SetTileMethod(Color.Black, LisaaTaso); 44 kentta.SetTileMethod(Color.Yellow, LisaaTahti); 45 kentta.SetTileMethod(Color.Red, LisaaMake); 39 46 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 40 47 Level.CreateBorders(); … … 101 108 void TormaaTahteen(PhysicsObject hahmo, PhysicsObject tahti) 102 109 { 110 MessageDisplay.Add("Keräsit es!"); 103 111 maaliAani.Play(); 104 MessageDisplay.Add("Keräsit tähden!");105 112 tahti.Destroy(); 106 113 } 114 115 void LisaaMake(Vector paikka, double leveys, double korkeus) 116 { 117 PhysicsObject Make = new PhysicsObject(50, 100); 118 Make.Position = paikka; 119 Make.Mass = 4.0; 120 Make.Image = make; 121 AddCollisionHandler(Make, pelaaja1, MakeMurhaa); 122 FollowerBrain seuraajanAivot = new FollowerBrain("pelaaja"); 123 seuraajanAivot.TargetDistance.AddTrigger(); 124 Make.Brain = seuraajanAivot; 125 Add(Make); 126 } 127 128 void MakeMurhaa(PhysicsObject jonne, PhysicsObject pelaaja) 129 { 130 MessageDisplay.Add("Make murhaa!"); 131 kuolemaAani.Play(); 132 pelaaja.Destroy(); 133 134 } 107 135 } -
2012/26/VilleS/TasoKokeiluJuttu/TasoKokeiluJuttu/TasoKokeiluJuttuContent/TasoKokeiluJuttuContent.contentproj
r3441 r3486 70 70 </Compile> 71 71 </ItemGroup> 72 <ItemGroup> 73 <Compile Include="es.png"> 74 <Name>es</Name> 75 <Importer>TextureImporter</Importer> 76 <Processor>TextureProcessor</Processor> 77 </Compile> 78 </ItemGroup> 79 <ItemGroup> 80 <Compile Include="my_movie.wav"> 81 <Name>my_movie</Name> 82 <Importer>WavImporter</Importer> 83 <Processor>SoundEffectProcessor</Processor> 84 </Compile> 85 </ItemGroup> 86 <ItemGroup> 87 <Compile Include="Make.png"> 88 <Name>Make</Name> 89 <Importer>TextureImporter</Importer> 90 <Processor>TextureProcessor</Processor> 91 </Compile> 92 </ItemGroup> 93 <ItemGroup> 94 <Compile Include="die_sound_effect.wav"> 95 <Name>die_sound_effect</Name> 96 <Importer>WavImporter</Importer> 97 <Processor>SoundEffectProcessor</Processor> 98 </Compile> 99 </ItemGroup> 72 100 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 73 101 <!-- 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.