예제 #1
0
 void OnTriggerExit(Collider col)
 {
     if (col.gameObject.tag == "Player")
     {
         resScript = col.gameObject.GetComponentInParent <Transform>().parent.GetComponentInParent <Transform>().Find("ReviveCollider").GetComponentInChildren <Resurection>();
         resScript.RemoveHealth(myHealth);
     }
 }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        isActing = false;
        //init gameController
        DontDestroy parentFunction = GetComponentInParent <DontDestroy>();

        attackScript      = parentFunction.GetComponentInChildren <Attack>();
        resurectionScript = parentFunction.GetComponentInChildren <Resurection>();
        capacityScript    = parentFunction.GetComponentInChildren <LaunchCapacity>();
        defenseScript     = parentFunction.GetComponentInChildren <Defense>();
        controllerName    = parentFunction.controllerName;
    }