- Timestamp:
- 2011-07-01 10:33:14 (12 years ago)
- Location:
- 2011/26/JaakkoL
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Enemies.cs
r2361 r2397 25 25 brain.Speed = speed; 26 26 brain.FollowAlways = true; 27 //brain.StopWhenTargetClose = true;28 27 brain.TargetCloseDistance = 20; 29 28 } 30 31 private void closeToTarget(FollowerBrain senderBrain, EventArgs e)32 {33 senderBrain.Speed += 500;34 }35 36 public override void deathOccurred()37 {38 /*Explosion explosion = new Explosion(1000);39 explosion.Position = this.Position;40 Add(explosion);*/41 this.Destroy();42 }43 29 } -
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/GenCharacter.cs
r2361 r2397 44 44 45 45 // A method for handling death, i.e., removing the player, saving scores or whatever 46 public v irtual void deathOccurred()46 public void deathOccurred() 47 47 { 48 /*Explosion explosion = new Explosion(100);49 explosion.Position = this.Position;50 Add(explosion);*/51 48 this.Destroy(); 52 49 } -
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/InsideReactor.txt
r2392 r2397 1 ================================================= 2 | | 3 | | 4 | a x a | 5 | a | ========================= | a | 6 |====|= ============== =|====| 7 |aa | ==== | aa| 8 | | == == | | 9 | | == a a == | | 10 | ==== ==== | 11 | === === | 12 | | 13 |==== a ====| 14 | ==== | 15 | | 16 | a a | 17 | ========= ========= | 18 | | 19 | P a a a | 20 |===============================================| 1 ====================== 2 | | 3 | a a | 4 |============== | 5 | == | 6 |== a | 7 | ===== a | 8 | ==== = | 9 | | 10 | | 11 | a a | 12 | ======== ====== | 13 | | 14 | P a a | 15 ====================== -
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Peli.cs
r2371 r2397 13 13 const int SCREEN_HEIGHT = 50; 14 14 Player player; 15 Image background1 = LoadImage("Images/reactor BG");15 Image background1 = LoadImage("Images/reactorInsideBG"); 16 16 17 17 public override void Begin() … … 83 83 Camera.ZoomFactor = 1.0; 84 84 Camera.StayInLevel = true; 85 86 //AddCollisionHandler(MeleeAlien alien, handleAlienCollision); 87 } 88 89 void handleAlienCollision(MeleeAlien alien, Player player) 90 { 91 player.reduceHitPointsBy(10); 85 92 } 86 93 87 94 void createLevel() 88 95 { 89 TileMap levelSpec = TileMap.FromFile(" ReactorEntrance.txt");96 TileMap levelSpec = TileMap.FromFile("InsideReactor.txt"); 90 97 levelSpec['='] = createVerticalBlock; 91 98 levelSpec['|'] = createHorizontalBlock; … … 105 112 MeleeAlien addMeleeAlien() 106 113 { 107 MeleeAlien meleeAlien = new MeleeAlien(45, 80, Shape.Rectangle, 100, player);114 MeleeAlien meleeAlien = new MeleeAlien(45, 80, Shape.Rectangle, 50, player); 108 115 return meleeAlien; 109 116 } -
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Player.cs
r2371 r2397 9 9 { 10 10 const int speed = 200; 11 const int jumpSpeed = 200;11 const int jumpSpeed = 600; 12 12 const int mass = 10; 13 13 Image portrait = Game.LoadImage("Images/character"); 14 Image reversedPortrait = Game.LoadImage("Images/characterreverse"); 14 15 SoundEffect walking = Game.LoadSoundEffect("Sounds/walkingsound"); 15 16 … … 46 47 47 48 this.changeWeapon(rifle.name()); 48 // Collision handlers for enemies49 //AddCollisionHandler();50 49 } 51 50 … … 92 91 { 93 92 MeleeAlien alien = (MeleeAlien)target; 94 //alien.reduceHitPointsBy(this.Weapon.firePower()); 95 alien.reduceHitPointsBy(10); 93 94 int damage = 0; 95 96 if (currentWeapon == pistol.name()) 97 { 98 damage = pistol.firePower(); 99 } 100 else if (currentWeapon == rifle.name()) 101 { 102 damage = rifle.firePower(); 103 } 104 105 alien.reduceHitPointsBy(damage); 96 106 } 97 107 } … … 106 116 walker.Start(); 107 117 this.Walk(speed); 108 //this.Image = Image.Mirror(portrait); // Doesn't work at all!118 this.Image = portrait; 109 119 } 110 120 … … 113 123 walker.Start(); 114 124 this.Walk(-speed); 115 this.Image = Image.Mirror(portrait);125 this.Image = reversedPortrait; 116 126 } 117 127 -
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372.csproj
r2355 r2397 122 122 <Content Include="Game.ico" /> 123 123 <Content Include="GameThumbnail.png" /> 124 <Content Include="InsideReactor.txt"> 125 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 126 </Content> 124 127 <Content Include="ReactorEntrance.txt"> 125 128 <CopyToOutputDirectory>Always</CopyToOutputDirectory> -
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372Content/Rogue Agent 2372Content.contentproj
r2360 r2397 127 127 </Compile> 128 128 </ItemGroup> 129 <ItemGroup> 130 <Compile Include="Images\characterreverse.png"> 131 <Name>characterreverse</Name> 132 <Importer>TextureImporter</Importer> 133 <Processor>TextureProcessor</Processor> 134 </Compile> 135 </ItemGroup> 136 <ItemGroup> 137 <Compile Include="Images\basealienreverse.png"> 138 <Name>basealienreverse</Name> 139 <Importer>TextureImporter</Importer> 140 <Processor>TextureProcessor</Processor> 141 </Compile> 142 </ItemGroup> 143 <ItemGroup> 144 <Compile Include="Images\reactorInsideBG.png"> 145 <Name>reactorInsideBG</Name> 146 <Importer>TextureImporter</Importer> 147 <Processor>TextureProcessor</Processor> 148 </Compile> 149 </ItemGroup> 129 150 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 130 151 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2011/26/JaakkoL/todo.txt
r2371 r2397 1 1 Bugilista: 2 2 Kävelyääni tulee vain seisoessa paikallaan 3 Sprite kääntyy vain vasemmalle 3 Viholliset leijuvat ilmassa 4 Aseiden vaihtaminen 4 5 5 6 Featurelista: 6 7 HP:en visuaalinen dokumentointi 7 Ensimmäinen oikea kenttä (+ ovi)8 Aseiden vaihtaminen9 8 Vihollisten hyökkäykset 9 Voittaminen
Note: See TracChangeset
for help on using the changeset viewer.