void Awake() { controller = GetComponent<CharacterController>(); fx = GameObject.FindObjectOfType<FullScreenFX>(); if(Application.loadedLevelName == firstLevelName) { fx.SendMessage("OnGameBeginFX", 2f); } else { fx.SendMessage("OnLevelBeginFX", 2f); } }
void Start() { startTime = Time.time; fx = GameObject.FindObjectOfType<FullScreenFX>(); fx.SendMessage("OnTitleBeginFX", 2f); }
// Use this for initialization void Start() { highscores = GetComponent<Highscores>(); fx = GameObject.FindObjectOfType<FullScreenFX>(); fx.SendMessage("OnTitleBeginFX", 1f); }