Example #1
0
 public Enemy(int health, string damageSound, Sprite sprite, uint collisionDamage, float speed)
     : base("", "Enemies", health, damageSound, sprite, true, collisionDamage, "Players", "Projectiles")
 {
     this.speed = speed;
     OnCollision += new Action1(collideWith);
     OnDamage += new Action(damageEffect);
 }
Example #2
0
        public Powerup(int amount, string damageSound, Sprite sprite, float speed)
            : base("", "Powerups", 1, damageSound, sprite, true, 0, "Players")
        {
            this.speed = speed;
            this.amount = amount;

            OnCollision += new Action1(collision);
        }
Example #3
0
 public Projectile(int hits, Sprite sprite, uint collisionDamage, Vector2 velocity, params string[] collisionGroups)
     : base("", "Projectiles", hits, "", sprite, true, collisionDamage, collisionGroups)
 {
     OnCollision += new Action1(collide);
     Sprite.Velocity = velocity;
 }
Example #4
0
 public Animation(Sprite sprite)
     : base("", "Effects", 1, "", sprite, false, 0)
 {
 }
Example #5
0
 public TargetedEnemy(int health, string damageSound, Sprite sprite, uint collisionDamage, float speed, Entity target)
     : base(health, damageSound, sprite, collisionDamage, speed)
 {
     this.target = target;
     OnCollision += coll;
 }
Example #6
0
 public Bubble(int amount, Sprite sprite, float speed)
     : base(amount, "Bubble", sprite, speed)
 {
     OnCollision += new Action1(collide);
     OnDeath += bubbleSound;
 }
Example #7
0
 public HealthPack(int amount, Sprite sprite, float speed)
     : base(amount, "Health", sprite, speed)
 {
     OnCollision += new Action1(collide);
 }