- Timestamp:
- 2015-07-02 17:00:02 (8 years ago)
- Location:
- 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/Exit.cs
r6717 r6767 21 21 : base(width, height) 22 22 { 23 IsVisible = false; 23 24 //Color = new Color(255, 0, 0, 60); // Debuggausta varten jotta näkee uloskäynnit. 24 25 IgnoresCollisionResponse = true; -
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/Item.cs
r6717 r6767 265 265 } 266 266 267 if (o.Tag.Equals("cracked")) 268 { 269 o.Destroy(); 270 } 271 267 272 var cre = o as Creature; 268 273 if (cre != null) -
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/LevelCreation.cs
r6717 r6767 40 40 level.SetObjectMethod("bossspawn", CreateBossSpawn); 41 41 level.SetObjectMethod("itemdrop", CreateItem); 42 level.SetObjectMethod("cracked", CreateCrackedWall); 43 level.SetObjectMethod("goldenheart", CreateGoldenHeart); 42 44 level.Execute(); 43 45 44 //Level.CreateBorders(false);46 Level.CreateBorders(false); 45 47 46 48 Level.Background.Color = Color.Black; 49 } 50 51 private void CreateGoldenHeart(Vector position, double width, double height, Angle angle, Shape shape, string name, Dictionary<string, string> properties) 52 { 53 var chest = PhysicsObject.CreateStaticObject(width, height); 54 chest.Image = ChestImage; 55 chest.IgnoresCollisionResponse = true; 56 chest.Position = position; 57 chest.Tag = "chest"; 58 Add(chest); 59 } 60 61 private void CreateCrackedWall(Vector position, double width, double height, Angle angle, Shape shape, string name, Dictionary<string, string> properties) 62 { 63 var tile = PhysicsObject.CreateStaticObject(width, height); 64 tile.Tag = "cracked"; 65 tile.Image = crackedWallImage; 66 tile.Position = position; 67 Add(tile); 47 68 } 48 69 -
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel.cs
r6717 r6767 92 92 public static SoundEffect GunSound = LoadSoundEffect("gunsound"); 93 93 public static SoundEffect EnemyDieSound = LoadSoundEffect("enemydie"); 94 public static SoundEffect ChestOpenSound = LoadSoundEffect("chestopen2"); 94 95 95 96 public static Image GunImage = LoadImage("gun"); … … 106 107 public static Image MaskImage = LoadImage("helm"); 107 108 public static Image MaskLargeImage = LoadImage("helmlarge"); 109 public static Image GoldenHeartImage = LoadImage("goldenheart"); 110 public static Image ChestImage = LoadImage("chest"); 111 public static Image ChestOpenImage = LoadImage("chestopen"); 112 113 public static Image crackedWallImage = LoadImage("cracked"); 108 114 109 115 public static Image GrenadeBoxImage = LoadImage("grenadebox"); … … 303 309 "Coyotes on a train.", 304 310 "Coyotes on a train, that's all I'm sayin'", 305 "- Ana"311 "-Gabriel" 306 312 }), LetterImage)); 307 313 308 //ShowTextItem(storyItems[0]);314 ShowTextItem(storyItems[0]); 309 315 } 310 316 … … 380 386 381 387 player.Inventory.Add(new Monocle(player)); 382 388 383 389 //player.Sword = new Sword(player); 384 390 //player.Inventory.Add(new Pistol(player)); 385 391 //player.Inventory.Add(new Grenade(player)); 386 392 387 //player.Health.Value = 3; // Alkuun vain kolme sydäntä.388 player.Health.Value = player.Health.MaxValue = 100;393 player.Health.Value = 5; 394 //player.Health.Value = player.Health.MaxValue = 100; 389 395 390 396 AddCollisionHandler(player, "exit", CollidesWithExit); … … 436 442 UpdateItemCycleImages(); 437 443 }); 438 } 439 444 445 AddCollisionHandler(player, "chest", delegate(PhysicsObject p, PhysicsObject chest) 446 { 447 // Arkusta saa nyt aina uuden sydämen. 448 ChestOpenSound.Play(); 449 chest.Tag = null; 450 451 Timer.SingleShot(1.0, delegate 452 { 453 chest.Image = ChestOpenImage; 454 455 var heart = PhysicsObject.CreateStaticObject(20, 20); 456 heart.IgnoresCollisionResponse = true; 457 heart.Image = GoldenHeartImage; 458 heart.Position = chest.Position; 459 heart.Velocity = new Vector(0, 14); 460 heart.LifetimeLeft = TimeSpan.FromSeconds(2.0); 461 Add(heart, 3); 462 463 player.Health.Value++; 464 }); 465 }); 466 } 440 467 441 468 void StoryTime(PhysicsObject pPlayer, PhysicsObject storyBlock) … … 457 484 { 458 485 player.Sword = new Sword(player); 486 UpdateItemCycleImages(); 459 487 } 460 488 -
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabrielContent/TheLegendOfGabrielContent.contentproj
r6717 r6767 391 391 </Compile> 392 392 </ItemGroup> 393 <ItemGroup> 394 <Compile Include="cracked.png"> 395 <Name>cracked</Name> 396 <Importer>TextureImporter</Importer> 397 <Processor>TextureProcessor</Processor> 398 </Compile> 399 </ItemGroup> 400 <ItemGroup> 401 <Compile Include="chestopen2.wav"> 402 <Name>chestopen2</Name> 403 <Importer>WavImporter</Importer> 404 <Processor>SoundEffectProcessor</Processor> 405 </Compile> 406 </ItemGroup> 407 <ItemGroup> 408 <Compile Include="chest.png"> 409 <Name>chest</Name> 410 <Importer>TextureImporter</Importer> 411 <Processor>TextureProcessor</Processor> 412 </Compile> 413 <Compile Include="chestopen.png"> 414 <Name>chestopen</Name> 415 <Importer>TextureImporter</Importer> 416 <Processor>TextureProcessor</Processor> 417 </Compile> 418 </ItemGroup> 393 419 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 394 420 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabrielContent/level1.tmx
r6716 r6767 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <map version="1.0" orientation="orthogonal" renderorder="right-down" width="25" height="40" tilewidth="20" tileheight="20" nextobjectid="4 5">2 <map version="1.0" orientation="orthogonal" renderorder="right-down" width="25" height="40" tilewidth="20" tileheight="20" nextobjectid="46"> 3 3 <tileset firstgid="1" source="LegendOfGabrielTileset.tsx"/> 4 4 <layer name="base" width="25" height="40"> 5 5 <data encoding="base64" compression="zlib"> 6 eJztk zEKgDAMRYtDnRx6A+9/yiI4hFKTqP+nUDq8ySSP/sSSUiqCXVBIXLNP4cgCT3+vLjccgvab5nqq7eFx/CXCsVgs5mG7Yc9nOdjzR7yB4WFnNGofETth5zaDY8b/EH1DjJvqzYxwIDP/6rDqEdlrfajdav2o7CNv8E1mCId1Fx6P9QbvjtAO7RZaXwXySxdC6 eJztk7EKwCAMRKWDnTq4dPb/v7IUOgSxMbV3EcThTcY8vMQUQkiCXZA6OA01d+8sHFFgcdTqYsEhKM8011ttDYvjLx6OxWIxD9sDuz/Lwe4/4g0MDzujUfPwmAk7txkcM/5D9A4xdqrW08OBzLzX0apHZK/dQ81Wu4/K3nMHv2SGcLT2wuJpvcE6I7RD24XSdwE+6hdH 7 7 </data> 8 8 </layer> … … 56 56 <layer name="cover" width="25" height="40"> 57 57 <data encoding="base64" compression="zlib"> 58 eJztz QEJAAAIA7BXsH9ZscRB2Aos+WdKR+MBAACAs/s2ADQ=58 eJztzaENAAAMAkFW6P7L1lc3qLvkLSS/5nmv/TEnAAAAaFjujwBn 59 59 </data> 60 60 </layer> 61 <objectgroup color="#ebdb23" name="goldenheart"> 62 <object id="45" x="40" y="540" width="20" height="20"/> 63 </objectgroup> 61 64 </map> -
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabrielContent/level2.tmx
r6717 r6767 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <map version="1.0" orientation="orthogonal" renderorder="right-down" width="25" height="25" tilewidth="20" tileheight="20" nextobjectid=" 12">2 <map version="1.0" orientation="orthogonal" renderorder="right-down" width="25" height="25" tilewidth="20" tileheight="20" nextobjectid="24"> 3 3 <tileset firstgid="1" source="LegendOfGabrielTileset.tsx"/> 4 4 <layer name="base" width="25" height="25"> … … 7 7 </properties> 8 8 <data encoding="base64" compression="zlib"> 9 eJzFl MEKwCAMQ8WDp+3Q///ZXRxISa2tcTsEBkqebdpJKUUcXQt3dnV36W+mNxKTUYG+YmQ4Yx+QL2JEWajnHgvVNOOiM4vznlt1IYZ1J1rTbCa8d1jzy2Ss5HdytlE9J/dHSIyVTBiMzFz9zYjuf/b/Etm9CGM2l54Y/rt5NufdjJ1qwHvXV/enAQ7TvyoGkzPmq/Ng7O0D0lMf/g==9 eJzFlrEKgDAMREsHJzv4/z8rgkMISXPXHjoEFEJeEl+LV2vtKuIEcnZjvOGflbWjUDJ6EF8xVJyovmUoWBljNhPLzXble0CcyHLsOzLTzImqj8xfJQM5O4jbK45k86gZ3gWEUd0fyDdhGNGMiGN/MlB/KsbKOWfOH3uHzbxE3Nitv+P+k3MUfVd9MQx0dmZnwzA8R8Gw+7cMhMMwumGo/xFuoT8fdA== 10 10 </data> 11 11 </layer> … … 37 37 <object id="9" x="390" y="270" width="20" height="20"/> 38 38 </objectgroup> 39 <layer name="cover" width="25" height="25" >39 <layer name="cover" width="25" height="25" visible="0"> 40 40 <data encoding="base64" compression="zlib"> 41 eJxjYBgF gxUI4mBT03x0TGvzh4sd1AbDxY5RMApGwSgYBfQDAJbFAkM=41 eJxjYBgFo2DoAkECfGrZgY5H7SBsDy0BPewYBaNgFIyCwQ4AiXABZg== 42 42 </data> 43 43 </layer> … … 49 49 </object> 50 50 </objectgroup> 51 <objectgroup color="#c517bd" name="cracked"> 52 <object id="12" x="360" y="380" width="20" height="20"/> 53 <object id="13" x="380" y="380" width="20" height="20"/> 54 <object id="14" x="360" y="400" width="20" height="20"/> 55 <object id="15" x="380" y="400" width="20" height="20"/> 56 <object id="16" x="180" y="300" width="20" height="20"/> 57 <object id="17" x="200" y="300" width="20" height="20"/> 58 </objectgroup> 59 <objectgroup color="#f4d72f" name="goldenheart"> 60 <object id="18" x="340" y="440" width="20" height="20"/> 61 <object id="20" x="420" y="440" width="20" height="20"/> 62 <object id="21" x="60" y="280" width="20" height="20"/> 63 <object id="22" x="40" y="180" width="20" height="20"/> 64 <object id="23" x="80" y="180" width="20" height="20"/> 65 </objectgroup> 51 66 </map> -
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabrielContent/level3.tmx
r6717 r6767 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <map version="1.0" orientation="orthogonal" renderorder="right-down" width="30" height="20" tilewidth="20" tileheight="20" nextobjectid="1 4">2 <map version="1.0" orientation="orthogonal" renderorder="right-down" width="30" height="20" tilewidth="20" tileheight="20" nextobjectid="15"> 3 3 <tileset firstgid="1" source="LegendOfGabrielTileset.tsx"/> 4 4 <layer name="base" width="30" height="20"> … … 45 45 </data> 46 46 </layer> 47 <objectgroup color="#dcbf19" name="goldenheart"> 48 <object id="14" x="480" y="320" width="20" height="20"/> 49 </objectgroup> 47 50 </map>
Note: See TracChangeset
for help on using the changeset viewer.