- Timestamp:
- 2015-07-03 11:31:24 (8 years ago)
- Location:
- 2015/27/AakeR/IMBT
- Files:
-
- 8 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/27/AakeR/IMBT/IMBT/IMBT/IMBT.cs
r6762 r6783 48 48 ((IMBT)Game.Instance).AddCollisionHandler(this, "perusAmmus", delegate(PhysicsObject a, PhysicsObject b) 49 49 { 50 this.healthit.Value -= 4;50 this.healthit.Value -= 3; 51 51 SavuLiekki(); 52 52 }); … … 107 107 108 108 Flame liekki = new Flame(((IMBT)Game.Instance).liekkiKuva); 109 liekki.MinScale = 25.0; 110 liekki.MaxScale = 50.0; 111 liekki.ScaleAmount = 0.8; 109 112 Game.Instance.Add(liekki); 110 113 liekki.Position = this.Position; … … 147 150 SoundEffect raketinAani = LoadSoundEffect("RakettiAani"); 148 151 SoundEffect palloAani = LoadSoundEffect("PalloAani"); 152 SoundEffect boostiAani = LoadSoundEffect("BoostiAani"); 149 153 Pelaaja pelaaja1; 154 MultiSelectWindow alkuValikko; 155 int pelaajienMaara = 2; 150 156 double maxNopeus = 1000.0; 151 157 152 //TODO Alkuvalikko 153 //TODO Boosti 158 154 159 155 160 public override void Begin() 156 161 { 157 LuoKentta(); 162 Alkuvalikko(); 163 //LuoKentta(); 158 164 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 159 165 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 160 } 166 167 } 168 169 void Alkuvalikko() 170 { 171 alkuValikko = new MultiSelectWindow("Pelin alkuvalikko", 172 "Pelaa", "Lopeta"); 173 Add(alkuValikko); 174 alkuValikko.AddItemHandler(0, PelaajaMaara); 175 alkuValikko.AddItemHandler(1, Exit); 176 177 178 } 179 180 void PelaajaMaara() 181 { 182 alkuValikko.Destroy(); 183 alkuValikko = new MultiSelectWindow("Pelaajien määrä", "2 Pelaajaa", "3 Pelaajaa", "4 Pelaajaa"); 184 Add(alkuValikko); 185 alkuValikko.AddItemHandler(0, LuoKentta); 186 alkuValikko.AddItemHandler(1, delegate { pelaajienMaara = 3; LuoKentta(); }); 187 alkuValikko.AddItemHandler(2, delegate { pelaajienMaara = 4; LuoKentta(); }); 188 } 189 161 190 void LuoKentta() 162 191 { 163 192 164 ColorTileMap ruudut = ColorTileMap.FromLevelAsset("kenttä1"); 193 alkuValikko.Destroy(); 194 string Kenttä = RandomGen.SelectOne<string>("Kenttä1", "Kenttä2", "Kenttä3", "Kenttä4"); 195 ColorTileMap ruudut = ColorTileMap.FromLevelAsset(Kenttä); 165 196 166 197 167 198 ruudut.SetTileMethod(Color.FromHexCode("0026FF"), LuoPelaaja1); 168 199 ruudut.SetTileMethod(Color.Cyan, LuoPelaaja2); 169 ruudut.SetTileMethod(Color.BrightGreen, LuoPelaaja3); 170 ruudut.SetTileMethod(Color.Rose, LuoPelaaja4); 200 if (pelaajienMaara >= 3) 201 { 202 ruudut.SetTileMethod(Color.BrightGreen, LuoPelaaja3); 203 } 204 if (pelaajienMaara == 4) 205 { 206 ruudut.SetTileMethod(Color.Rose, LuoPelaaja4); 207 } 171 208 ruudut.SetTileMethod(Color.Black, LuoPalikka); 172 209 Level.Background.Color = Color.Silver; 173 210 174 211 ruudut.Execute(80, 80); 212 Wind = new Vector(RandomGen.NextDouble(-50, 50), RandomGen.NextDouble(-50, 50)); 175 213 Camera.ZoomToLevel(); 176 214 } … … 345 383 if (olio.Tag.Equals("pelaaja")) 346 384 { 347 ((Pelaaja)olio).healthit.Value -= 1 2;385 ((Pelaaja)olio).healthit.Value -= 14; 348 386 ((Pelaaja)olio).SavuLiekki(); 349 387 } … … 356 394 pelaaja.boosti = false; 357 395 pelaaja.Hit(pelaaja.Angle.GetVector() * 1000); 358 Timer.SingleShot(5, delegate 396 boostiAani.Play(); 397 Timer.SingleShot(4, delegate 359 398 { 360 399 pelaaja.boosti = true; -
2015/27/AakeR/IMBT/IMBT/IMBT/IMBT.csproj.Debug.cachefile
r6762 r6783 10 10 Content\Pelaaja3Kone1Tykki.xnb 11 11 Content\Pelaaja4Kone1Tykki.xnb 12 Content\AmmusÃÀni.xnb 12 13 Content\Kone1PerusAmmus.xnb 13 Content\AmmusÃÀni.xnb14 14 Content\KimpoilevaPallo.xnb 15 15 Content\Raketti.xnb … … 19 19 Content\RakettiAani.xnb 20 20 Content\PalloAani.xnb 21 Content\BoostiAani.xnb 22 Content\KenttÀ2.xnb 23 Content\KenttÀ3.xnb 24 Content\KenttÀ4.xnb -
2015/27/AakeR/IMBT/IMBT/IMBT/obj/x86/Debug/IMBT.csproj.FileListAbsolute.txt
r6762 r6783 27 27 C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\RakettiAani.xnb 28 28 C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\PalloAani.xnb 29 C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\BoostiAani.xnb 30 C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\KenttÀ2.xnb 31 C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\KenttÀ3.xnb 32 C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\KenttÀ4.xnb -
2015/27/AakeR/IMBT/IMBT/IMBT/obj/x86/Debug/cachefile-{B6A1F4C9-F2E2-4290-A5B5-3717058CC989}-targetpath.txt
r6762 r6783 10 10 Content\Pelaaja3Kone1Tykki.xnb 11 11 Content\Pelaaja4Kone1Tykki.xnb 12 Content\AmmusÃÀni.xnb 12 13 Content\Kone1PerusAmmus.xnb 13 Content\AmmusÃÀni.xnb14 14 Content\KimpoilevaPallo.xnb 15 15 Content\Raketti.xnb … … 19 19 Content\RakettiAani.xnb 20 20 Content\PalloAani.xnb 21 Content\BoostiAani.xnb 22 Content\KenttÀ2.xnb 23 Content\KenttÀ3.xnb 24 Content\KenttÀ4.xnb -
2015/27/AakeR/IMBT/IMBT/IMBTContent/IMBTContent.contentproj
r6762 r6783 171 171 </Compile> 172 172 </ItemGroup> 173 <ItemGroup> 174 <Compile Include="BoostiAani.wav"> 175 <Name>BoostiAani</Name> 176 <Importer>WavImporter</Importer> 177 <Processor>SoundEffectProcessor</Processor> 178 </Compile> 179 </ItemGroup> 180 <ItemGroup> 181 <Compile Include="Kenttä2.png"> 182 <Name>Kenttä2</Name> 183 <Importer>TextureImporter</Importer> 184 <Processor>TextureProcessor</Processor> 185 </Compile> 186 <Compile Include="Kenttä3.png"> 187 <Name>Kenttä3</Name> 188 <Importer>TextureImporter</Importer> 189 <Processor>TextureProcessor</Processor> 190 </Compile> 191 </ItemGroup> 192 <ItemGroup> 193 <Compile Include="Kenttä4.png"> 194 <Name>Kenttä4</Name> 195 <Importer>TextureImporter</Importer> 196 <Processor>TextureProcessor</Processor> 197 </Compile> 198 </ItemGroup> 173 199 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 174 200 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/27/AakeR/IMBT/IMBT/IMBTContent/obj/x86/Debug/ContentPipeline.xml
r6657 r6783 18 18 <Options>None</Options> 19 19 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja1Kone1.xnb</Output> 20 <Time>2015-07-0 1T10:03:14.4004934+03:00</Time>20 <Time>2015-07-03T09:18:32.4692936+03:00</Time> 21 21 </Item> 22 22 <Item> … … 27 27 <Options>None</Options> 28 28 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja2Kone1.xnb</Output> 29 <Time>2015-07-0 1T10:03:14.4104934+03:00</Time>29 <Time>2015-07-03T09:18:32.4792935+03:00</Time> 30 30 </Item> 31 31 <Item> … … 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja3Kone1.xnb</Output> 38 <Time>2015-07-0 1T10:03:14.4104934+03:00</Time>38 <Time>2015-07-03T09:18:32.4792935+03:00</Time> 39 39 </Item> 40 40 <Item> … … 45 45 <Options>None</Options> 46 46 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja4Kone1.xnb</Output> 47 <Time>2015-07-0 1T10:03:14.4204934+03:00</Time>47 <Time>2015-07-03T09:18:32.4892934+03:00</Time> 48 48 </Item> 49 49 <Item> … … 54 54 <Options>None</Options> 55 55 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Palikka.xnb</Output> 56 <Time>2015-0 6-29T13:34:01.6885599+03:00</Time>56 <Time>2015-07-03T09:18:32.4692936+03:00</Time> 57 57 </Item> 58 58 <Item> … … 72 72 <Options>None</Options> 73 73 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja1Kone1Tykki.xnb</Output> 74 <Time>2015-07-0 1T10:03:14.4304934+03:00</Time>74 <Time>2015-07-03T09:18:32.4892934+03:00</Time> 75 75 </Item> 76 76 <Item> … … 81 81 <Options>None</Options> 82 82 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja2Kone1Tykki.xnb</Output> 83 <Time>2015-07-0 1T10:03:14.4304934+03:00</Time>83 <Time>2015-07-03T09:18:32.4992933+03:00</Time> 84 84 </Item> 85 85 <Item> … … 90 90 <Options>None</Options> 91 91 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja3Kone1Tykki.xnb</Output> 92 <Time>2015-07-0 1T10:03:14.4404934+03:00</Time>92 <Time>2015-07-03T09:18:32.4992933+03:00</Time> 93 93 </Item> 94 94 <Item> … … 99 99 <Options>None</Options> 100 100 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Pelaaja4Kone1Tykki.xnb</Output> 101 <Time>2015-07-0 1T10:03:14.4404934+03:00</Time>101 <Time>2015-07-03T09:18:32.5092932+03:00</Time> 102 102 </Item> 103 103 <Item> … … 118 118 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Kone1PerusAmmus.xnb</Output> 119 119 <Time>2015-07-01T10:03:14.4204934+03:00</Time> 120 </Item> 121 <Item> 122 <Source>KimpoilevaPallo.png</Source> 123 <Name>KimpoilevaPallo</Name> 124 <Importer>TextureImporter</Importer> 125 <Processor>TextureProcessor</Processor> 126 <Options>None</Options> 127 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\KimpoilevaPallo.xnb</Output> 128 <Time>2015-07-03T09:18:32.4892934+03:00</Time> 129 </Item> 130 <Item> 131 <Source>Raketti.png</Source> 132 <Name>Raketti</Name> 133 <Importer>TextureImporter</Importer> 134 <Processor>TextureProcessor</Processor> 135 <Options>None</Options> 136 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Raketti.xnb</Output> 137 <Time>2015-07-03T09:18:32.4492938+03:00</Time> 138 </Item> 139 <Item> 140 <Source>RenkaidenJäljet.png</Source> 141 <Name>RenkaidenJäljet</Name> 142 <Importer>TextureImporter</Importer> 143 <Processor>TextureProcessor</Processor> 144 <Options>None</Options> 145 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\RenkaidenJäljet.xnb</Output> 146 <Time>2015-07-03T09:18:32.4392939+03:00</Time> 147 </Item> 148 <Item> 149 <Source>Rajahdys.png</Source> 150 <Name>Rajahdys</Name> 151 <Importer>TextureImporter</Importer> 152 <Processor>TextureProcessor</Processor> 153 <Options>None</Options> 154 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Rajahdys.xnb</Output> 155 <Time>2015-07-03T09:18:32.4592937+03:00</Time> 156 </Item> 157 <Item> 158 <Source>Liekki.png</Source> 159 <Name>Liekki</Name> 160 <Importer>TextureImporter</Importer> 161 <Processor>TextureProcessor</Processor> 162 <Options>None</Options> 163 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Liekki.xnb</Output> 164 <Time>2015-07-03T09:18:32.4592937+03:00</Time> 165 </Item> 166 <Item> 167 <Source>RakettiAani.wav</Source> 168 <Name>RakettiAani</Name> 169 <Importer>WavImporter</Importer> 170 <Processor>SoundEffectProcessor</Processor> 171 <Options>None</Options> 172 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\RakettiAani.xnb</Output> 173 <Time>2015-07-03T09:18:32.4492938+03:00</Time> 174 </Item> 175 <Item> 176 <Source>PalloAani.wav</Source> 177 <Name>PalloAani</Name> 178 <Importer>WavImporter</Importer> 179 <Processor>SoundEffectProcessor</Processor> 180 <Options>None</Options> 181 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\PalloAani.xnb</Output> 182 <Time>2015-07-03T09:18:32.4692936+03:00</Time> 183 </Item> 184 <Item> 185 <Source>BoostiAani.wav</Source> 186 <Name>BoostiAani</Name> 187 <Importer>WavImporter</Importer> 188 <Processor>SoundEffectProcessor</Processor> 189 <Options>None</Options> 190 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\BoostiAani.xnb</Output> 191 <Time>2015-07-03T11:01:08.3841777+03:00</Time> 192 </Item> 193 <Item> 194 <Source>Kenttä2.png</Source> 195 <Name>Kenttä2</Name> 196 <Importer>TextureImporter</Importer> 197 <Processor>TextureProcessor</Processor> 198 <Options>None</Options> 199 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Kenttä2.xnb</Output> 200 <Time>2015-07-03T11:28:50.6449807+03:00</Time> 201 </Item> 202 <Item> 203 <Source>Kenttä3.png</Source> 204 <Name>Kenttä3</Name> 205 <Importer>TextureImporter</Importer> 206 <Processor>TextureProcessor</Processor> 207 <Options>None</Options> 208 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Kenttä3.xnb</Output> 209 <Time>2015-07-03T11:16:08.2803777+03:00</Time> 210 </Item> 211 <Item> 212 <Source>Kenttä4.png</Source> 213 <Name>Kenttä4</Name> 214 <Importer>TextureImporter</Importer> 215 <Processor>TextureProcessor</Processor> 216 <Options>None</Options> 217 <Output>C:\MyTemp\AakeR\IMBT\IMBT\IMBT\bin\x86\Debug\Content\Kenttä4.xnb</Output> 218 <Time>2015-07-03T11:29:47.2944632+03:00</Time> 120 219 </Item> 121 220 <BuildSuccessful>true</BuildSuccessful>
Note: See TracChangeset
for help on using the changeset viewer.