Пример #1
0
    public ManufactoryTask(ManufactoryTaskData taskData)
    {
        shipToProduce = taskData.shipToProduce;

        var watchFactory = new WatchFactory();

        travelFactory = watchFactory.CreateTravelFactory();

        TripClock = travelFactory.CreateTripClock(taskData.buildTimeLeft);
    }
Пример #2
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);
    }
Пример #3
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);
    }
Пример #4
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);
        }
    }