Esempio n. 1
0
 public override void CollisionResolution(GameObject Item)
 {
     if (Item.GetType().Equals(typeof(Avatar)))
     {
     }
     if (Item.GetType().Equals(typeof(FireBall)))
     {
         FireBall temp = Item as FireBall;
         if (temp.Friendly())
         {
             SoundManager.Instance().AddSound(new SFX("SFX\\explosion"));
             this.HP = -1;
         }
     }
 }
Esempio n. 2
0
        public override void CollisionResolution(GameObject Item)
        {
            if (Item.GetType().Equals(typeof(DamageBox)))
            {
                DamageBox temp = Item as DamageBox;
                if (!temp.Friendly())
                {
                    SoundManager.Instance().AddSound(new SFX("SFX\\explosion"));
                    kinetics.ApplyForce(temp.kinetics.orientations.GetVecOrientation() * 30);
                }
            }

            if (Item.GetType().Equals(typeof(FireBall)))
            {
                FireBall temp = Item as FireBall;
                if (!temp.Friendly())
                {
                    SoundManager.Instance().AddSound(new SFX("SFX\\explosion"));
                }
            }
        }
Esempio n. 3
0
 public override void CollisionResolution(GameObject Item)
 {
     if (Item.GetType().Equals(typeof(Avatar)))
     {
     }
     if (Item.GetType().Equals(typeof(FireBall)))
     {
         FireBall temp = Item as FireBall;
         if (temp.Friendly())
         {
             SoundManager.Instance().AddSound(new SFX("SFX\\explosion"));
             float test = Vector2.Dot(kinetics.orientations.GetVecOrientation(), temp.kinetics.orientations.GetVecOrientation());
             if (test < 0)
             {
                 HP -= 1;
             }
             else
             {
                 HP = 0;
             }
         }
     }
 }