Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        currentHealth = maxHealth;
        healthBar.SetMaxHealth(maxHealth);


        anim = GetComponent <Animator>();
    }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        rigidbody2d   = transform.GetComponent <Rigidbody2D>();
        boxCollider2d = transform.GetComponent <BoxCollider2D>();
        timeManager   = GameObject.Find("TimeManager").GetComponent <TimeManager>();
        soundManager  = GameObject.Find("Sounds").GetComponent <SoundManager>();

        currentHealth = maxHealth;
        healthbar.SetMaxHealth(maxHealth);
    }
Example #3
0
    // Use this for initialization
    void Start()
    {
        rb          = this.GetComponent <Rigidbody>();
        enemyanim   = this.GetComponent <Animator>();
        audiosource = this.GetComponent <AudioSource>();

        currentHealth = maxHealth;
        healthBar.SetMaxHealth(maxHealth);
        Hptext.GetComponent <Text>().text = (maxHealth + "/" + currentHealth);

        target = GameObject.Find("Player"); //find Player name

        PlayerScript.Playerdeath = false;
    }
Example #4
0
    // Start is called before the first frame update
    void Start()
    {
        //check adn set ammo when start
        currentAmmo = maxAmmo;
        Ammotext.GetComponent <Text>().text = (maxAmmo + "/" + currentAmmo);

        audiosource = GetComponent <AudioSource>();
        //check, set and display health when start
        currentHealth = maxHealth;
        healthBar.SetMaxHealth(maxHealth);
        Hptext.GetComponent <Text>().text = (maxHealth + "/" + currentHealth);

        //set Text
        Scoretext.GetComponent <Text>().text = "Zombies Kill: " + Scorecount;

        //
        if (Score == null)
        {
            Score = this;
        }

        //Player death true or false
        Playerdeath = false;
    }
Example #5
0
 void Start()
 {
     currentHealth = MaxHealth;
     healthBar.SetMaxHealth(MaxHealth);
 }
Example #6
0
 private void Start()
 {
     healthbarscript.SetMaxHealth(houseHealth);
     // VV To be removed with new Game Manager VV
     GameWatcher.objectiveCount++;
 }
Example #7
0
 void Start()
 {
     currentHealth = maxHealth;
     Healthbar.SetMaxHealth(maxHealth);
 }