private void Awake() { PlayerRB = GetComponent <Rigidbody2D>(); curr_health = max_health; CurrentWeapon.last_fired = CurrentWeapon.fire_rate; transform.position = last_visited; HPSlider.value = curr_health / max_health; score.text = "0"; CurrentWeapon.Awake(); }
private void Awake() { PlayerRB = GetComponent <Rigidbody2D>(); curr_health = max_health; CurrentWeapon.last_fired = CurrentWeapon.fire_rate; transform.position = last_visited; HPSlider.value = curr_health / max_health; CurrentWeapon.Awake(); weaponIndex = 0; Ammo.text = "Ammo:" + CurrentWeapon.currentAmmo.ToString(); }