示例#1
0
    public void TryNextNotification()
    {
        if (notifications.Count <= 0)
        {
            return;
        }
        Notification nextNotification = notifications.Dequeue();

        countdown.Reset();
        isNotifying = true;
        DoNotification(nextNotification);
    }
    void StartProduction(bool forcedStart = false)
    {
        Debug.Log("STARTING PRODUCTION ON " + producer.current_Blueprint.itemProduced.itemName);
        // Grab an instance of the item about to be produced
        itemInProduction = item_Manager.CreateInstance(item_Manager.GetPrototype(producer.current_Blueprint.itemProduced.itemName));
        timeToCreate     = itemInProduction.timeToCreate;
        // Set timer
        if (forcedStart == true)
        {
            float timePassed = (itemInProduction.timeToCreate * 0.25f) * producer.productionStage;
            timer.Reset(timeToCreate, timePassed);
        }
        else
        {
            timer.Reset(timeToCreate);
        }

        SetProductionStage(timer.elapsedPercent, forcedStart);
        isProducing = true;
        AnimateStayOn();
    }
示例#3
0
	public override void Enter(){
		if (shipManager == null)
			shipManager = ShipManager.instance;
		if (levelUI == null)
			levelUI = LevelUI_Manager.instance;

		// First check that essential systems can turn on and Use ship systems
		if (shipManager.ShipOn() == false){
			// Push the Idle state and wait for systems to be fixed before continuing
			// This state should stop updating progress to station
		}
		// Show ship ui
		levelUI.DisplayShipUI();
		// Start timer
		countdown.Reset();

		lastEventTime = 0;
	}
示例#4
0
 void OnStopMove()
 {
     isChecking = false;
     countdown.Reset();
 }