Ejemplo n.º 1
0
        private void OnFire()
        {
            m_fireLimit = 0.0f;
            Vector bulletStartPoint = PlayerUnit.Location + PlayerUnit.Direction.ToVector();

            var bulletUnit = new BulletUnit(PlayerUnit.World,
                bulletStartPoint.ToPointF(), PlayerUnit);

            bulletUnit.Direction = PlayerUnit.Direction;
            bulletUnit.FixLocation();

            bulletUnit.UserData = new VisualBulletUnit(bulletUnit,
                Gfx.Instance.GetPlayerBulletFlightAnimation());

            PlayerUnit.World.Bullets.Add(bulletUnit);
        }
Ejemplo n.º 2
0
 private void Fire()
 {
     var nLocation = Location + Direction.ToVector();
     var unit = new BulletUnit(World, nLocation.ToPointF(), this);
     unit.Direction = Direction;
     World.Bullets.Add(unit);
     m_timeStep = 0.0f;
 }
Ejemplo n.º 3
0
 public VisualBulletUnit(BulletUnit bulletUnit,
     SpriteAnimation flightAnimation)
 {
     BulletUnit = bulletUnit;
     FlightAnimation = flightAnimation;
 }