Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
 public static void resolvePlayerVsBullet(cPlayer player, cBullet bullet, Vector2f intersection)
 {
     bullet.kill();
 }