Changeset 7167
- Timestamp:
- 2016-05-14 14:39:27 (7 years ago)
- Location:
- 2015/koodauskerho/OttoR
- Files:
-
- 10 added
- 2 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/koodauskerho/OttoR/BattleArena/BattleArena/BattleArena/BattleArena.cs
r7153 r7167 14 14 15 15 PlatformCharacter pelaaja1; 16 16 17 int pelaaja1hahmo = 0; 17 18 18 19 int vahinko = 0; 19 20 21 22 private Image[] Flight = LoadImages("monsters/consumer", "monsters/consumer2", "monsters/consumer3"); 23 24 20 25 DoubleMeter elamaLaskuri; 21 26 27 22 28 Image ShadowKuva = LoadImage("monsters/shadow"); 23 29 Image DirtKuva = LoadImage("blocks/dirt"); … … 32 38 Image GrassKuva = LoadImage("blocks/grass"); 33 39 Image tahti1Kuva = LoadImage("blocks/boomBox"); 34 Image C rabKuva = LoadImage("monsters/crab");40 Image ConsumerKuva = LoadImage("monsters/consumer"); 35 41 Image FuelKuva = LoadImage("blocks/fuel1"); 36 42 37 43 class monster : PlatformCharacter 38 44 { … … 67 73 SmoothTextures = false; 68 74 } 69 75 70 76 71 77 void LuoAlkuvalikko() … … 146 152 kentta.SetTileMethod('T', LisaaTaintedGrass); 147 153 kentta.SetTileMethod('S', LisaaShadow); 148 kentta.SetTileMethod('C', LisaaC rab);154 kentta.SetTileMethod('C', LisaaConsumer); 149 155 kentta.SetTileMethod('d', LisaaFuel); 150 156 … … 251 257 void LisaaShadow(Vector paikka, double leveys, double korkeus) 252 258 { 253 monster Shadow = new monster(leveys, korkeus); 259 UusiaShadoveja(paikka, new Vector(leveys, korkeus)); 260 261 Timer ajastin = new Timer(); 262 ajastin.Interval = RandomGen.NextDouble(3, 10); 263 ajastin.Start(); 264 ajastin.Timeout += delegate 265 { 266 UusiaShadoveja(paikka, new Vector(leveys,korkeus)); 267 }; 268 269 270 } 271 void UusiaShadoveja(Vector paikka, Vector koko) 272 { 273 monster Shadow = new monster(koko.X,koko.Y); 254 274 Shadow.Image = ShadowKuva; 255 275 Shadow.Position = paikka; … … 257 277 Shadow.Tag = "Shadow"; 258 278 Shadow.CanMoveOnAir = true; 259 279 260 280 PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 261 281 tasoAivot.Speed = 150; … … 267 287 Shadow.Brain = tasoAivot; 268 288 Add(Shadow); 269 270 271 272 273 } 274 void UusiaShadoveja() 275 { 276 277 } 278 void LisaaCrab(Vector paikka, double leveys, double korkeus) 279 { 280 monster1 Crab = new monster1(19, 15); 281 Crab.Image = CrabKuva; 282 Crab.Position = paikka; 283 Crab.Mass = 10.0; 284 Crab.Tag = "monster1"; 285 Crab.CanMoveOnAir = true; 286 287 PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 288 tasoAivot.Speed = 100; 289 290 Crab.Brain = tasoAivot; 291 292 Add(Crab); 289 } 290 void LisaaConsumer(Vector paikka, double leveys, double korkeus) 291 { 292 PhysicsObject Consumer = new PhysicsObject(leveys, korkeus); 293 Consumer.Image = ConsumerKuva; 294 Consumer.Position = paikka; 295 Consumer.Mass = 1.0; 296 Consumer.Tag = "monster1"; 297 AddCollisionHandler(Consumer, "ammus", delegate(PhysicsObject a, PhysicsObject b) { Consumer.Destroy(); }); 298 Consumer.IgnoresPhysicsLogics = true; 299 Consumer.IgnoresCollisionResponse = true; 300 FollowerBrain seuraajanaivot= new FollowerBrain(pelaaja1); 301 seuraajanaivot.Speed = 150; 302 Consumer.Brain = seuraajanaivot; 303 Consumer.Animation = new Animation(Flight); 304 Consumer.Animation.Start(); 305 Add(Consumer); 293 306 294 307 … … 458 471 ammus.Size *= 0.3; 459 472 ammus.Width *= 2.0; 460 ammus.Image = LoadImage("ammusKuva"); 473 ammus.Image = LoadImage("ammusKuva"); 474 ammus.Tag = "ammus"; 461 475 ammus.MaximumLifetime = TimeSpan.FromSeconds(2.0); 462 476 } -
2015/koodauskerho/OttoR/BattleArena/BattleArena/BattleArena/BattleArena.csproj.Debug.cachefile
r7153 r7167 30 30 Content\blocks\taintedgrass.xnb 31 31 Content\blocks\dirt.xnb 32 Content\monsters\crab.xnb33 32 Content\monsters\shadow.xnb 34 33 Content\blocks\fuel1.xnb 35 34 Content\blocks\Freak.xnb 36 35 Content\music\freak it.xnb 36 Content\monsters\consumer.xnb 37 Content\monsters\consumer2.xnb 38 Content\monsters\consumer3.xnb 37 39 Content\music\taustamusiikki.wma 38 40 Content\music\boombox.wma -
2015/koodauskerho/OttoR/BattleArena/BattleArena/BattleArena/obj/x86/Debug/BattleArena.csproj.FileListAbsolute.txt
r7153 r7167 41 41 C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\blocks\taintedgrass.xnb 42 42 C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\blocks\dirt.xnb 43 C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\monsters\crab.xnb44 43 C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\monsters\shadow.xnb 45 44 C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\blocks\fuel1.xnb … … 47 46 C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\music\freak it.xnb 48 47 C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\music\freak it.wma 48 C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\monsters\consumer.xnb 49 C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\monsters\consumer2.xnb 50 C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\monsters\consumer3.xnb -
2015/koodauskerho/OttoR/BattleArena/BattleArena/BattleArena/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r7153 r7167 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2016-0 4-16T12:51:33.1175299+03:00</Time>38 <Time>2016-05-14T12:49:08.8095314+03:00</Time> 39 39 </Item> 40 40 <Item> … … 285 285 </Item> 286 286 <Item> 287 <Source>monsters\crab.png</Source>288 <Name>monsters\crab</Name>289 <Importer>TextureImporter</Importer>290 <Processor>TextureProcessor</Processor>291 <Options>None</Options>292 <Output>C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\monsters\crab.xnb</Output>293 <Time>2016-03-12T12:56:37.6249254+02:00</Time>294 </Item>295 <Item>296 287 <Source>monsters\shadow.png</Source> 297 288 <Name>monsters\shadow</Name> … … 329 320 <Extra>C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\music\freak it.wma</Extra> 330 321 <Time>2016-04-16T10:11:38.5558553+03:00</Time> 322 </Item> 323 <Item> 324 <Source>monsters\consumer.png</Source> 325 <Name>monsters\consumer</Name> 326 <Importer>TextureImporter</Importer> 327 <Processor>TextureProcessor</Processor> 328 <Options>None</Options> 329 <Output>C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\monsters\consumer.xnb</Output> 330 <Time>2016-05-14T11:34:28.8123314+03:00</Time> 331 </Item> 332 <Item> 333 <Source>monsters\consumer2.png</Source> 334 <Name>monsters\consumer2</Name> 335 <Importer>TextureImporter</Importer> 336 <Processor>TextureProcessor</Processor> 337 <Options>None</Options> 338 <Output>C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\monsters\consumer2.xnb</Output> 339 <Time>2016-05-14T13:00:36.3181314+03:00</Time> 340 </Item> 341 <Item> 342 <Source>monsters\consumer3.png</Source> 343 <Name>monsters\consumer3</Name> 344 <Importer>TextureImporter</Importer> 345 <Processor>TextureProcessor</Processor> 346 <Options>None</Options> 347 <Output>C:\MyTemp\OttoR\BattleArena\BattleArena\BattleArena\bin\x86\Debug\Content\monsters\consumer3.xnb</Output> 348 <Time>2016-05-14T13:00:42.3749314+03:00</Time> 331 349 </Item> 332 350 <BuildSuccessful>true</BuildSuccessful> -
2015/koodauskerho/OttoR/BattleArena/BattleArena/BattleArena/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt
r7153 r7167 33 33 Content\blocks\taintedgrass.xnb 34 34 Content\blocks\dirt.xnb 35 Content\monsters\crab.xnb36 35 Content\monsters\shadow.xnb 37 36 Content\blocks\fuel1.xnb … … 39 38 Content\music\freak it.xnb 40 39 Content\music\freak it.wma 40 Content\monsters\consumer.xnb 41 Content\monsters\consumer2.xnb 42 Content\monsters\consumer3.xnb -
2015/koodauskerho/OttoR/BattleArena/BattleArena/BattleArenaContent/BattleArenaContent.contentproj
r7153 r7167 259 259 </ItemGroup> 260 260 <ItemGroup> 261 <Compile Include="monsters\crab.png">262 <Name>crab</Name>263 <Importer>TextureImporter</Importer>264 <Processor>TextureProcessor</Processor>265 </Compile>266 </ItemGroup>267 <ItemGroup>268 261 <Compile Include="monsters\shadow.png"> 269 262 <Name>shadow</Name> … … 291 284 <Importer>Mp3Importer</Importer> 292 285 <Processor>SongProcessor</Processor> 286 </Compile> 287 </ItemGroup> 288 <ItemGroup> 289 <Compile Include="monsters\consumer.png"> 290 <Name>consumer</Name> 291 <Importer>TextureImporter</Importer> 292 <Processor>TextureProcessor</Processor> 293 </Compile> 294 </ItemGroup> 295 <ItemGroup> 296 <Compile Include="monsters\consumer2.png"> 297 <Name>consumer2</Name> 298 <Importer>TextureImporter</Importer> 299 <Processor>TextureProcessor</Processor> 300 </Compile> 301 </ItemGroup> 302 <ItemGroup> 303 <Compile Include="monsters\consumer3.png"> 304 <Name>consumer3</Name> 305 <Importer>TextureImporter</Importer> 306 <Processor>TextureProcessor</Processor> 293 307 </Compile> 294 308 </ItemGroup> -
2015/koodauskerho/OttoR/BattleArena/BattleArena/BattleArenaContent/kentta1.txt
r7153 r7167 2 2 # 3 3 # 4 # S S S5 # ## ## #### s s6 #* 7 ##### S S S8 # ## ## ## S4 # 5 # ## ## #### 6 #* C C C C C 7 ##### 8 # ## ## ## 9 9 #X #### 10 ### 11 # ####### S10 ### S C 11 # ####### 12 12 #B ## ### 13 ## # ### S d S S S14 # ##### ## ####### # S d TTTTTTTTTTTTTTTTTTTTTT d Sd13 ## # ### d 14 # ##### ## ####### # d TTTTTTTTTTTTTTTTTTTTTT d d 15 15 #f ## TTTTTTTTDDDDDDDDDDDDDDDDDDDDDDTTTTTTTTTTTTTTT d d S 16 ## # N ### STTTDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDTTTTTTTTTTTT16 ## # N ### C TTTDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDTTTTTTTTTTTT 17 17 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGTTTTTTDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
Note: See TracChangeset
for help on using the changeset viewer.