Exemplo n.º 1
0
 public void RequestStateChange(int RequestedState)
 {
     if (this.gameObject.transform.parent != null)
     {
         OwningDevice = this.gameObject.transform.parent.GetComponent <LogicInterface>();
         OwningDevice.ReactToLogic(this.gameObject, RequestedState);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Checks if the user right clicked, asks owning device to take care of the Logic.
 /// </summary>
 private void OnMouseOver()
 {
     if (Input.GetMouseButtonDown(1))
     {
         if (this.gameObject.transform.parent != null)
         {
             OwningDevice = this.gameObject.transform.parent.GetComponent <LogicInterface>();
             OwningDevice.ReactToLogic(this.gameObject);
         }
     }
 }