Esempio n. 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.GetComponent <S_MachineBase>() != null)
     {
         MachineFound = other.gameObject.GetComponent <S_MachineBase>();
     }
 }
Esempio n. 2
0
 private void OnTriggerExit(Collider other)
 {
     if (MachineFound != null)
     {
         if (other.gameObject.GetComponent <S_MachineBase>() == MachineFound)
         {
             Interact(false);
             MachineFound.Interactable = false;
             MachineFound = null;
         }
     }
 }
Esempio n. 3
0
    public virtual void Start()
    {
        if (GameObject.Find("_GameController") != null)
        {
            ref_GameController = GameObject.Find("_GameController").GetComponent <S_GameController>();
        }
        else
        {
            Debug.Log("No Game controller!");
        }

        if (ref_GameController.CharacterController.Interactor.MachineFound != null)
        {
            ref_Machine = ref_GameController.CharacterController.Interactor.MachineFound;
        }
    }