public void Update() { if (Input.GetButtonDown("Jump")) { if (currentlyInvestigating) { GameState.Instance.SendMessage("HideDialog"); currentlyInvestigating = null; } else { if (couldInvestigate != null) { currentlyInvestigating = couldInvestigate; GameState.Instance.SendMessage("ShowDialog", currentlyInvestigating); } else { if (cc.isGrounded) { isJumping = true; } } } } }
public void ClearCanInvestigate(Investigatable obj) { if (couldInvestigate = obj) { couldInvestigate = null; } }
public void SetCanInvestigate(Investigatable obj) { couldInvestigate = obj; }
public void ShowDialog(Investigatable obj) { panel.SetActive(true); text.text = obj.text; }