Exemplo n.º 1
0
 void Start()
 {
     PlayerHp    = GetComponent <Hpbar>();
     anim        = GetComponent <Animator>();
     Loot        = GetComponent <LootScript>();
     boxCollider = GetComponent <BoxCollider>();
     currentHp   = FullHp;
 }
Exemplo n.º 2
0
    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);
    }
Exemplo n.º 3
0
 void Start()
 {
     PlayerHp = GameObject.Find("Player").GetComponent <Hpbar>();
     anim     = GetComponent <Animator>();
     zombiehp = GetComponent <Enemyhp>();
 }
Exemplo n.º 4
0
 void Start()
 {
     Playerhp = GameObject.Find("Player").GetComponent <Hpbar>();
 }