Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public Beam(ShipBeamTurret parentTurret, string dataAsset = "", bool addRigidBody = true)
     : base(dataAsset, parentTurret, addRigidBody)
 {
     ParentTurret = parentTurret;
 }