Ejemplo n.º 1
0
 private void Update()
 {
     if (EventSystem.instance.eventButtonSpawn == true)
     {
         eventButton.SetButtonInteractable(!
                                           (OverclockController.instance.overclocking || EventSystem.instance.chatting ||
                                            EventSystem.instance.mutiny || EventSystem.instance.eventActive));
     }
 }
Ejemplo n.º 2
0
    public void SetTalkToCrewButtonState(bool state)
    {
        talkButton.interactable = state;
        talkButtonText.SetButtonInteractable(state);

        //changes tool tip text on why button is disabled
        if (GameManager.instance.currentGameState == InGameStates.ShipBuilding)
        {
            //overtimeToolTipDisabledText.SetActive(true);
            talkToCrewToolTipDisabledText.text = "Can't talk with Crew while Docked in the StarPort";
        }
        else if (state == true)
        {
            //overtimeToolTipDisabledText.SetActive(false);
            talkToCrewToolTipDisabledText.text = " ";
        }
        else
        {
            //overtimeToolTipDisabledText.SetActive(true);
            talkToCrewToolTipDisabledText.text = "No Crew to Talk to in this Room";
        }
    }
Ejemplo n.º 3
0
    public void SetOvertimeButtonState(bool state)
    {
        overtimeButton.interactable = state;
        overtimeButtonText.SetButtonInteractable(state);

        //changes tool tip text on why button is disabled
        if (GameManager.instance.currentGameState == InGameStates.ShipBuilding)
        {
            //overtimeToolTipDisabledText.SetActive(true);
            overtimeToolTipDisabledText.text = "Can't Perform Overtime Mini-Game while docked in the StarPort";
        }
        else if (state == true)
        {
            //overtimeToolTipDisabledText.SetActive(false);
            overtimeToolTipDisabledText.text = " ";
        }
        else
        {
            //overtimeToolTipDisabledText.SetActive(true);
            overtimeToolTipDisabledText.text = "Overtime Mini-Game is on Cooldown";
        }
    }
Ejemplo n.º 4
0
 private void Awake()
 {
     eventButton = GetComponent <ButtonTwoBehaviour>();
     backDrop.SetActive(false);
     eventButton.SetButtonInteractable(false);
 }
Ejemplo n.º 5
0
 // if hull repair should deactivate
 private void CheckCanRepairShip()
 {
     // has enough credits and hull is less than max
     hullRepairButton.SetButtonInteractable(shipStats.Credits >= priceForHullRepair && shipStats.ShipHealthCurrent.x < shipStats.ShipHealthCurrent.y);
 }
Ejemplo n.º 6
0
 // if crew refill should deactivate
 private void CheckCanRefillCrew()
 {
     // has enough credits and crew current is less than capacity
     crewRefillButton.SetButtonInteractable(shipStats.Credits >= priceForCrewReplacement && shipStats.CrewCurrent.x < shipStats.CrewCurrent.y);
 }
Ejemplo n.º 7
0
 // if energy refill should deactivate
 private void CheckCanRefillEnergy()
 {
     // has enough credits and energy is less than max
     energyRefillButton.SetButtonInteractable(shipStats.Credits >= priceForEnergyRefill && shipStats.Energy.x < shipStats.Energy.z);
 }
Ejemplo n.º 8
0
    private void Update()
    {
        if (tutorialPanel.activeSelf && index == 0)
        {
            backButton.SetButtonInteractable(false);
        }
        else
        {
            backButton.SetButtonInteractable(true);
        }

        if (Input.GetKeyDown(KeyCode.Return))
        {
            ContinueButton();
        }
        if (Input.GetKeyDown(KeyCode.Backspace))
        {
            ContinueButton(true);
        }

        if (tutorialPanel.activeSelf == true && GameManager.instance.currentGameState == InGameStates.Events && !ticker.IsTickStopped())
        {
            Debug.LogWarning("stopping tick");
            ticker.StopTickUpdate();
        }

        //Effects
        ///////////////////////////////////////////////////////////////////////////////////////
        if (tutorialPanel.activeSelf == true)
        {
            if (GameManager.instance.currentGameState == InGameStates.ShipBuilding)
            {
                if (currentTutorial.tutorialMessages[index].ghostCursorHydroponics)
                {
                    GhostCursorHydroponics();
                }
                else if (currentTutorial.tutorialMessages[index].ghostCursorChargingTerminal)
                {
                    GhostCursorChargingTerminal();
                }
                else if (currentTutorial.tutorialMessages[index].ghostCursorArmorPlating)
                {
                    GhostCursorArmorPlating();
                }
                else if (currentTutorial.tutorialMessages[index].ghostCursorStatBar)
                {
                    GhostCursorStatBar();
                }
                else if (currentTutorial.tutorialMessages[index].ghostCursorCrewBunks)
                {
                    GhostCursorCrewBunks();
                }

                //Crew Management Effect
                else if (currentTutorial.tutorialMessages[index].selectRoom)
                {
                    EffectSelectRoom();
                }
            }
        }
        /////////////////////////////////////////////////////////////////////////////////

        if (lerping)
        {
            ghostCursor.transform.position = LerpGhostCursor(lerpStart, lerpEnd, timeStartedLerping, lerpTime);

            if (ghostCursor.transform.position == lerpEnd)
            {
                lerping = false;
                BeginLerping(lerpStart, lerpEnd);
            }
        }

        //DynamicController();
    }
Ejemplo n.º 9
0
 private void Awake()
 {
     editCrewButton = GetComponent <ButtonTwoBehaviour>();
     editCrewButton.SetButtonInteractable(false);
 }