- Timestamp:
- 2011-06-30 10:36:54 (12 years ago)
- Location:
- 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Peli.cs
r2337 r2338 17 17 { 18 18 Gravity = new Vector(0, -1000); 19 20 19 createLevel(); 21 20 21 // Starts playing the background music, which is set to repeat 22 22 MediaPlayer.Play("Sounds/Stage1Music"); 23 23 MediaPlayer.Volume = 0.5; 24 MediaPlayer.IsRepeating = true; 24 25 25 26 Camera.Follow(player); … … 28 29 } 29 30 31 32 // Creates the level from a text file 30 33 void createLevel() 31 34 { … … 43 46 { 44 47 player = new Player(33, 74, Shape.Rectangle); 45 //Image i = LoadImage("Images/character");46 //player.Image = i;47 48 return player; 48 49 } -
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Player.cs
r2337 r2338 31 31 pistol.Y = 5; 32 32 this.Weapon = pistol; 33 34 //pistol.ProjectileCollision += bulletReachedTarget; 33 35 } 34 36 … … 45 47 PhysicsObject bullet = this.Weapon.Shoot(); 46 48 bullet.Hit(new Vector(1000, 0)); 49 50 // As of now weapons are set to have infinite ammo, but that might change 51 if (bullet != null) 52 { 53 54 } 55 } 56 57 void bulletReachedTarget(Bullet bullet, MeleeAlien target) 58 { 59 47 60 } 48 61 -
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Weapons.cs
r2337 r2338 8 8 public class Pistol : Weapon 9 9 { 10 public CollisionHandler BulletCollision 11 { 12 get { return ProjectileCollision; } 13 set { ProjectileCollision = value; } 14 } 15 10 16 public Pistol(double width, double height) 11 17 : base(width, height) … … 14 20 AttackSound = Game.LoadSoundEffect("Sounds/pistolshot"); 15 21 AmmoIgnoresGravity = true; 22 InfiniteAmmo = true; 16 23 } 17 24
Note: See TracChangeset
for help on using the changeset viewer.