void Start() { PlayerHp = GetComponent <Hpbar>(); anim = GetComponent <Animator>(); Loot = GetComponent <LootScript>(); boxCollider = GetComponent <BoxCollider>(); currentHp = FullHp; }
IEnumerator Delay() { yield return(new WaitForSeconds(1)); Hpbar Hp = this.GetComponentInChildren <Hpbar>(); Damage(1); Hp.HpMinus(1); yield return(new WaitForSeconds(1)); Damage(1); Hp.HpMinus(1); yield return(null); }
void Start() { PlayerHp = GameObject.Find("Player").GetComponent <Hpbar>(); anim = GetComponent <Animator>(); zombiehp = GetComponent <Enemyhp>(); }
void Start() { Playerhp = GameObject.Find("Player").GetComponent <Hpbar>(); }