private void Start() { currentHealth = maxHealth; GM = GameObject.Find("GameManager").GetComponent <GameManager>(); player = GetComponent <Player>(); healtBar = GameObject.FindGameObjectWithTag("HealthBar").GetComponent <HealtBar>(); healtBar.SetMaxHealth(maxHealth); }
void Start() { rigidBody = GetComponent <Rigidbody2D>(); healthbar.SetMaxHealth(maxHealth); animator.SetFloat("VelocityY", -1); }