private void SetReqFuel() { bool viaSkyhook = selectedLaunchMethod == LaunchMethod.Skyhook; ShipsDSID shipID = dock.Ship.shipType; reqFuelText.text = ReqFuelText + DSModelManager.Instance.ShipsModel.GetReqFuel(shipID, viaSkyhook); }
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 }
public void Launch(ShipsDSID shipID, int institutionLevel, float targetY) { fireObject.SetActive(true); AssignShipSrite(shipID); shipFlier = new ShipFlier(transform.position.y, targetY, timeToTarget, movementCurve); }
// 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(); }
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); }
public ShipRecipe(ShipsDSID shipID, string shipName) { this.shipID = shipID; this.shipName = shipName; }
private void AssignShipSrite(ShipsDSID shipID) { var shipSprite = Resources.Load <Sprite>($"Sprites/Ships/{shipID}"); shipSpriteRend.sprite = shipSprite; }