コード例 #1
0
    public void StartBuilding()
    {
        dockBuildTime = Settlement.Instance.CosmicPort.DockBuildTime;

        TripClock = travelFactory.CreateTripClock(dockBuildTime);

        UpdateState(DockState.Building);
    }
コード例 #2
0
    public void StartProgressBar(TripClock tripClock, float initialValue)
    {
        this.tripClock = tripClock;

        gameObject.SetActive(true);

        bar.fillAmount = initialValue;

        updateProgressBar = true;
    }
コード例 #3
0
    public ManufactoryTask(ManufactoryTaskData taskData)
    {
        shipToProduce = taskData.shipToProduce;

        var watchFactory = new WatchFactory();

        travelFactory = watchFactory.CreateTravelFactory();

        TripClock = travelFactory.CreateTripClock(taskData.buildTimeLeft);
    }
コード例 #4
0
    public ManufactoryTask(Ship shipToProduce)
    {
        this.shipToProduce = shipToProduce;

        var watchFactory = new WatchFactory();

        travelFactory = watchFactory.CreateTravelFactory();

        var taskTime = Settlement.Instance.Manufactory.BuildDuration;

        TripClock = travelFactory.CreateTripClock(taskTime);
    }
コード例 #5
0
    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);
    }
コード例 #6
0
    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);
        }
    }