Beispiel #1
0
 private void Start()
 {
     //Sets HUD to be a blank, since no upgrades are purchasable:
     upgradeText.text = string.Empty;
     //Finds the only playShip object based on Firebullets script:
     playerShip = FindObjectOfType <FireBullets>();
     //Applies first upgrade to ship:
     currentUpgrade = upgrades[currentUpgradeIndex];
     ApplyUpgrade();
     upgradeButton.gameObject.SetActive(false);
 }
Beispiel #2
0
    private void Start()
    {
        /* enemyHealth is scaled based on difficulty from SpawnManager, game will get more difficult as
         * the player scores a higher score
         */
        enemyHealth *= SpawningManagement.Factor + 1;

        //enemyHealth is then clamped, so it does not scale infinitely
        enemyHealth = Mathf.Clamp(enemyHealth, 0f, maximumPossibleHealth);

        //finds the playerObject's firebullet class
        playerObject = FindObjectOfType <FireBullets>();
    }