Exemplo n.º 1
0
 private void Start()
 {
     _plane       = GameObject.Find("Plane");
     _planeHealth = _plane.GetComponent <PlaneHealth>();
 }
Exemplo n.º 2
0
    public PlaneHealth pHealth; // creates a variable to hold the "currentHp" variable inside of the "CycleHealth" script attached to the Player object.

    // Use this for initialization
    void Start()
    {
        hBar = GetComponent <Image> ();                                     // assigns the the Image object to the "hBar" variable.

        pHealth = GameObject.Find("plane_1").GetComponent <PlaneHealth> (); //looks for the "CycleHealth script and assigns it to the "cHealth" variable.
    }