// Start is called before the first frame update void Start() { Aku = gameObject.GetComponent <PrangsangHeal>(); SliderGobj.SetActive(false); Invoke("onStartGame", 2); CC = gameObject.GetComponent <CC>(); }
private void OnTriggerExit(Collider other) { if (!isLocalPlayer) { return; } Target = null; HealthTarget = null; }
private void OnTriggerEnter(Collider other) { if (!isLocalPlayer) { return; } if (other.tag == "Player") { Debug.Log("Collide with Player"); Target = other.gameObject; if (other.name == "Ded") { HealthTarget = Target.GetComponentInParent <PrangsangHeal>(); } else { HealthTarget = Target.GetComponent <PrangsangHeal>(); } //Telling Ghea which target to heal } }
// Start is called before the first frame update void Start() { PH = this; Health = gameObject.GetComponent <Health>(); }