public void StartBuilding() { dockBuildTime = Settlement.Instance.CosmicPort.DockBuildTime; TripClock = travelFactory.CreateTripClock(dockBuildTime); UpdateState(DockState.Building); }
public void StartProgressBar(TripClock tripClock, float initialValue) { this.tripClock = tripClock; gameObject.SetActive(true); bar.fillAmount = initialValue; updateProgressBar = true; }
public ManufactoryTask(ManufactoryTaskData taskData) { shipToProduce = taskData.shipToProduce; var watchFactory = new WatchFactory(); travelFactory = watchFactory.CreateTravelFactory(); TripClock = travelFactory.CreateTripClock(taskData.buildTimeLeft); }
public ManufactoryTask(Ship shipToProduce) { this.shipToProduce = shipToProduce; var watchFactory = new WatchFactory(); travelFactory = watchFactory.CreateTravelFactory(); var taskTime = Settlement.Instance.Manufactory.BuildDuration; TripClock = travelFactory.CreateTripClock(taskTime); }
public Trip(Planet planetOfOrigin, Planet destination, int timeToDestination, Ship ship, Dock destinationDock) { this.planetOfOrigin = planetOfOrigin; this.destination = destination; this.timeToDestination = timeToDestination; this.ship = ship; this.destinationDock = destinationDock; var watchFactory = new WatchFactory(); travelFactory = watchFactory.CreateTravelFactory(); TripClock = travelFactory.CreateTripClock(timeToDestination); }
public Dock(DockData data) { dockName = data.dockName; dockState = data.dockState; DockID = data.dockID; Ship = data.ship; Destination = data.destination; if (data.resourcesInShip != null) { Ship.resourcesModule = new ResourcesModule(data.resourcesInShip); } var watchFactory = new WatchFactory(); travelFactory = watchFactory.CreateTravelFactory(); if (dockState == DockState.Building) { TripClock = travelFactory.CreateTripClock(data.buildTimeLeft); } }