Example #1
0
 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;
                 }
             }
         }
     }
 }
Example #2
0
 public void ClearCanInvestigate(Investigatable obj)
 {
     if (couldInvestigate = obj)
     {
         couldInvestigate = null;
     }
 }
Example #3
0
 public void SetCanInvestigate(Investigatable obj)
 {
     couldInvestigate = obj;
 }
Example #4
0
 public void ShowDialog(Investigatable obj)
 {
     panel.SetActive(true);
     text.text = obj.text;
 }