// Start is called before the first frame update void Start() { currentHealth = maxHealth; healthBar.SetMaxHealth(maxHealth); anim = GetComponent <Animator>(); }
// 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); }
// 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; }
// 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; }
void Start() { currentHealth = MaxHealth; healthBar.SetMaxHealth(MaxHealth); }
private void Start() { healthbarscript.SetMaxHealth(houseHealth); // VV To be removed with new Game Manager VV GameWatcher.objectiveCount++; }
void Start() { currentHealth = maxHealth; Healthbar.SetMaxHealth(maxHealth); }