void Start() { CameraBounderies(); BowMovement = GetComponent <Animator>(); //to control the bow animation Spawner = FindObjectOfType <PH_EnemySpawner>(); //find all those elements in the scene PauseController = FindObjectOfType <PH_Pause>(); gameSession = FindObjectOfType <PH_GameSession>(); sceneLoader = FindObjectOfType <PH_SceneLoader>(); float healthBonus = ((gameSession.GetMaxLives() - gameSession.GetCurrentLives()) * 1f / gameSession.GetMaxLives()) / 2; health = startingHealth *= (1 + healthBonus);//calculate bonus health, +10% for each lost heart }
// Start is called before the first frame update void Awake() { SetUpSingleton(); currentLives = fullLives; sceneLoader = FindObjectOfType <PH_SceneLoader>(); }