void Update() { if (Input.GetButtonDown("Interact") && GameMaster.CurrentGameState == GameState.Flying) { if (m_targetInteractible != null) { m_targetInteractible.OnInteract(); } } //TEMPORARY -- This functionality will be replaced with the Space Station UI if (Input.GetKeyDown(KeyCode.E) && GameMaster.CurrentGameState != GameState.Customization) { if (m_targetInteractible != null) { GameMaster.CurrentGameState = GameState.Customization; interactText.SetActive(false); } } if (Input.GetKeyDown(KeyCode.Escape) && GameMaster.CurrentGameState == GameState.Customization) { if (m_targetInteractible != null) { GameMaster.CurrentGameState = GameState.Flying; interactText.SetActive(true); } } }
void Update() { if (Input.GetButtonDown("Interact") && GameMaster.CurrentGameState == GameState.Flying) { if (m_targetInteractible != null) { m_targetInteractible.OnInteract(); } } if (Input.GetButtonDown("Warp") && GameMaster.CurrentGameState == GameState.Flying) { GameObject warpMngr = (GameObject)GameObject.Find("Warp Manager"); WarpScript warpScript = warpMngr.GetComponent <WarpScript>(); warpScript.CallHangar(); } //TEMPORARY -- This functionality will be replaced with the Space Station UI if (Input.GetKeyDown(KeyCode.E) && GameMaster.CurrentGameState != GameState.Customization) { if (m_targetInteractible != null) { GameMaster.CurrentGameState = GameState.Customization; interactText.SetActive(false); } } if (Input.GetKeyDown(KeyCode.Escape) && GameMaster.CurrentGameState == GameState.Customization) { if (m_targetInteractible != null) { GameMaster.CurrentGameState = GameState.Flying; interactText.SetActive(true); } } }