예제 #1
0
    private void SetReqFuel()
    {
        bool      viaSkyhook = selectedLaunchMethod == LaunchMethod.Skyhook;
        ShipsDSID shipID     = dock.Ship.shipType;

        reqFuelText.text = ReqFuelText + DSModelManager.Instance.ShipsModel.GetReqFuel(shipID, viaSkyhook);
    }
예제 #2
0
    public Ship(ShipsDSID shipType, string shipName, int shipMass)
    {
        this.shipType = shipType;
        this.shipName = shipName;
        this.shipMass = shipMass;

        totalWeight = shipMass; // When ship is created the totalWeight = shipMass
    }
예제 #3
0
    public void Launch(ShipsDSID shipID, int institutionLevel, float targetY)
    {
        fireObject.SetActive(true);

        AssignShipSrite(shipID);

        shipFlier = new ShipFlier(transform.position.y, targetY, timeToTarget, movementCurve);
    }
예제 #4
0
    // For override purpose
    protected virtual void OnCellPressed(ShipsDSID shipType)
    {
        if (shipType == ShipsDSID.Skyhook)
        {
            return;
        }

        ShowAssignShipToDockView();
    }
    protected override void OnCellPressed(ShipsDSID shipType)
    {
        var ship = GetSelectedCell().data.ship;

        dockToAssignTo.AssignShip(ship);

        Manufactory.RemoveShipFromStorage(ship);

        InstitutionsUIManager.Instance.CosmicPortUIManager.Back();
    }
예제 #6
0
    public bool CanLaunch(int currentFuelAmount, bool viaSkyhook, ShipsDSID shipID)
    {
        int reqFuel = DSModelManager.Instance.ShipsModel.GetReqFuel(shipID, viaSkyhook);

        // Check if has enough fuel
        bool canSend;

        canSend = currentFuelAmount >= reqFuel;

        return(canSend);
    }
예제 #7
0
 public ShipRecipe(ShipsDSID shipID, string shipName)
 {
     this.shipID   = shipID;
     this.shipName = shipName;
 }
예제 #8
0
    private void AssignShipSrite(ShipsDSID shipID)
    {
        var shipSprite = Resources.Load <Sprite>($"Sprites/Ships/{shipID}");

        shipSpriteRend.sprite = shipSprite;
    }