Ejemplo n.º 1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.tag == "killable")
     {
         text.text       = "Press E to kill";
         currentCollider = col;
         toDoAction      = possibleActions.kill;
     }
     else if (col.tag == "takeable")
     {
         text.text       = "Press E to take " + col.gameObject.name;
         currentCollider = col;
         toDoAction      = possibleActions.take;
     }
     else if (col.tag == "openable")
     {
         text.text       = "Press E to open the door";
         currentCollider = col;
         toDoAction      = possibleActions.open;
     }
 }
Ejemplo n.º 2
0
 void AfterAction()
 {
     text.text       = "";
     currentCollider = null;
     toDoAction      = possibleActions.nothing;
 }
Ejemplo n.º 3
0
 public Actions(possibleActions setOfActions, string text)
 {
     this.text         = text;
     this.setOfActions = setOfActions;
 }