private void Start() { _plane = GameObject.Find("Plane"); _planeHealth = _plane.GetComponent <PlaneHealth>(); }
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. }