void Awake() { instance = this; jumpButton = shipUIPanel.GetComponentInChildren <Button>(); jumpButton.onClick.AddListener(() => CallShipJump()); undockButton = stationUIPanel.transform.GetChild(0).GetChild(1).gameObject.GetComponent <Button>(); jobBoardButton = stationUIPanel.transform.GetChild(0).GetChild(0).gameObject.GetComponent <Button>(); undockButton.onClick.AddListener(() => CallStationUndock()); jobBoardButton.onClick.AddListener(() => DisplayJobBoard()); missionCompButton = missionCompPanel.GetComponentInChildren <Button>(); missionCompButton.onClick.AddListener(() => TryNextComplete()); missionCompText = missionCompPanel.transform.GetChild(0).GetChild(0).gameObject.GetComponent <Text>(); jobsAdded = new List <GameObject>(); }
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; }