public override void Start()
 {
     terminated = false;
     HumanBattleship.RailGun.Wander = false;
     Turret = HumanBattleship.RailGun;
     Turret.Owner = Owner;
     Firing = false;
 }
Beispiel #2
0
        private void InitializeTurretsPowerUps(PowerUp p)
        {
            if (p.Type == PowerUpType.RailGun)
            {
                RailGunTurret rgt = new RailGunTurret(Simulator)
                {
                    Position = HumanBattleship.Position + new Vector3(130, 30, 0),
                    VisualPriority = this.VisualPriority + 0.004f,
                    PlayerControlled = true,
                    UpdatePosition = false,
                    Watcher = false,
                    TimeLastBullet = double.MaxValue,
                    RangeAlpha = 0,
                    ShowRange = false,
                    ShowForm = false
                };

                p.BuyPosition = rgt.Position + new Vector3(300, 75, 0);
                HumanBattleship.RailGun = rgt;
                Turrets.Add(rgt);

                ImagesTurretsPowerUps.Add(p.Type, rgt);
            }
        }
        public Turret Create(TurretType type)
        {
            Turret t = null;

            switch (type)
            {
                case TurretType.Basic:              t = new BasicTurret(Simulator);            break;
                case TurretType.Gravitational:      t = new GravitationalTurret(Simulator);    break;
                case TurretType.MultipleLasers:     t = new MultipleLasersTurret(Simulator);   break;
                case TurretType.Laser:              t = new LaserTurret(Simulator);            break;
                case TurretType.Missile:            t = new MissileTurret(Simulator);          break;
                case TurretType.SlowMotion:         t = new SlowMotionTurret(Simulator);       break;
                case TurretType.Booster:            t = new BoosterTurret(Simulator);          break;
                case TurretType.Gunner:             t = new GunnerTurret(Simulator);           break;
                case TurretType.Nanobots:           t = new NanobotsTurret(Simulator);         break;
                case TurretType.RailGun:            t = new RailGunTurret(Simulator);          break;
                default:                            t = new BasicTurret(Simulator);            break;
            }

            return t;
        }