void Start() { currentLevel = 1; FirstEggCollected = false; SpawnEgg(new Vector3(0, eggHeight, 0)); cameraTintMaterial.SetColor("_Color", Color.white); cameraTintMaterial.SetFloat("_DesaturationValue", 0); seagullAudio = Seagull.GetComponent <AudioSource>(); seagullHealthManager = Seagull.GetComponent <SeagullHealthManager>(); // the first health token will spawn within 5 and 20s regardless of game mode healthTokenSpawnCountdown = Random.Range(5, 20); if (gameObject.GetComponent <GameSettings>().GetDifficulty() == 0) { healthSpawnTimeThreshold = 25; healthTokenPrefab.GetComponent <DespawnScript>().enabled = false; } else { healthSpawnTimeThreshold = 60; healthTokenPrefab.GetComponent <DespawnScript>().enabled = true; } }
// Use this for initialization void Start() { Seagull = GameObject.FindWithTag("Seagull"); seagullHealthManager = Seagull.GetComponent <SeagullHealthManager>(); }