Exemple #1
0
        public static void resolveMonsterVsBullet(cMonster m, cBullet bullet, Vector2f intersection)
        {
            Vector2f impulse = new Vector2f();

            impulse.X = bullet.Heading.X * Constants.BULLET_HIT_FORCE;
            impulse.Y = bullet.Heading.Y * Constants.BULLET_HIT_FORCE;
            m.AddForce(impulse);
            m.Hit(1, bullet);

            // bullet.Position = intersection;
            // bullet.LastPosition = intersection;

            bullet.kill();
        }
 public static void resolvePlayerVsBullet(cPlayer player, cBullet bullet, Vector2f intersection)
 {
     bullet.kill();
 }