Changeset 4467 for 2013


Ignore:
Timestamp:
2013-07-05 11:33:16 (6 years ago)
Author:
janiemit
Message:
 
Location:
2013/27/TeemuM/Game/Game/Game
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 2013/27/TeemuM/Game/Game/Game/Game.cs

    r4465 r4467  
    226226        } 
    227227        Zombie zombie = new Zombie(player, 50, 50, x + player.X, y + player.Y, 100); 
     228        zombie.Dying += delegate() { scoreboard.Value += 1; }; 
    228229        enemies.Add(zombie); 
    229230        Add(zombie); 
  • 2013/27/TeemuM/Game/Game/Game/Player.cs

    r4465 r4467  
    5757    } 
    5858 
     59    private void Explosion(Vector pos) 
     60    { 
     61        Explosion explosion = new Explosion(50); 
     62        explosion.Position = pos; 
     63        game.Add(explosion); 
     64    } 
     65 
    5966    private void ProjectileHanlder(PhysicsObject projectile, PhysicsObject target) //ToDo: Set collisions 
    6067    { 
    6168        if (target is Enemy) 
    6269        { 
     70            Explosion(target.Position); 
    6371            if (weapon is Cannon) 
    6472                ((Enemy)target).Health(-100); 
    6573            else if (weapon is PlasmaCannon) 
    66                 ((Enemy)target).Health(-50); 
     74                ((Enemy)target).Health(-100); 
    6775            else if (weapon is LaserGun) 
    6876                ((Enemy)target).Health(-50); 
Note: See TracChangeset for help on using the changeset viewer.