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
    }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Awake()
 {
     SetUpSingleton();
     currentLives = fullLives;
     sceneLoader  = FindObjectOfType <PH_SceneLoader>();
 }