Beispiel #1
0
        public void AddTurret(Vector2 hardPoint, ShipAddOnData addOnData)
        {
            ShipTurretData turretData = addOnData as ShipTurretData;
            string         dataAsset  = AssetManager.GetKeyFromData(turretData);

            ShipTurret turret = null;

            switch (turretData.TurretType)
            {
            case "Kinetic":
                turret = new ShipKineticTurret(hardPoint, dataAsset, this, true);
                break;

            case "Missile":
                turret = new ShipMissileTurret(hardPoint, dataAsset, this, true);
                break;

            case "Beam":
                turret = new ShipBeamTurret(hardPoint, dataAsset, this, true);
                break;
            }

            ShipAddOns.AddObject(turret);

            DealWithHardPoint(hardPoint, false);
        }
Beispiel #2
0
 public FiringArc(ShipTurret parentTurret, string dataAsset = "" /*"Sprites\\UI\\InGameUI\\FiringArc"*/)
     : base(dataAsset, parentTurret)
 {
     ParentTurret = parentTurret;
     Opacity      = 0.15f;
 }