void Awake() { Time.timeScale = 1; trans_GamePlayMusic = Instantiate(trans_GamePlayMusic) as Transform; script_GamePlayMusic = trans_GamePlayMusic.gameObject.GetComponent<StayAwakeSound>(); trans_EnterTheFocus = Instantiate(trans_EnterTheFocus) as Transform; script_EnterTheFocus = trans_EnterTheFocus.gameObject.GetComponent<StayAwakeSound>(); trans_FocusMode = Instantiate(trans_FocusMode) as Transform; script_FocusMode = trans_FocusMode.gameObject.GetComponent<StayAwakeSound>(); trans_SpeedBackUp = Instantiate(trans_SpeedBackUp) as Transform; script_SpeedBackUp = trans_SpeedBackUp.gameObject.GetComponent<StayAwakeSound>(); trans_PowerUpSpawn1 = Instantiate(trans_PowerUpSpawn1) as Transform; script_PowerUpSpawn1 = trans_PowerUpSpawn1.gameObject.GetComponent<PowerUpSpawn>(); trans_PowerUpSpawn2 = Instantiate(trans_PowerUpSpawn2) as Transform; script_PowerUpSpawn2 = trans_PowerUpSpawn2.gameObject.GetComponent<PowerUpSpawn>(); groundSpawnScript = groundSpawn.gameObject.GetComponent<SpawnScript>(); playerScript = player.gameObject.GetComponent<PlatformerCharacter2D>(); }
void Awake() { character = GetComponent<PlatformerCharacter2D>(); trans_Fart1 = Instantiate(trans_Fart1) as Transform; script_Fart1 = trans_Fart1.gameObject.GetComponent<StayAwakeSound>(); trans_Fart2 = Instantiate(trans_Fart2) as Transform; script_Fart2 = trans_Fart2.gameObject.GetComponent<StayAwakeSound>(); }
// Use this for initialization void Start() { GameControl.control.Load(); if (GameControl.control.playerName == "") { playerNeedsName = true; } trans_GameIntroMusic = Instantiate(trans_GameIntroMusic) as Transform; script_GameIntroMusic = trans_GameIntroMusic.gameObject.GetComponent<StayAwakeSound>(); script_GameIntroMusic.SetSoundTime(GameControl.control.gameIntroMusicMS); script_GameIntroMusic.Play(true); }
void Awake() { gameOver = false; trans_GameOverSound = Instantiate(trans_GameOverSound) as Transform; script_GameOverSound = trans_GameOverSound.gameObject.GetComponent<StayAwakeSound>(); }
void Start() { GameControl.control.Load(); textObject = this.gameObject.GetComponent<GUIText>(); trans_GameIntroMusic = Instantiate(trans_GameIntroMusic) as Transform; script_GameIntroMusic = trans_GameIntroMusic.gameObject.GetComponent<StayAwakeSound>(); script_GameIntroMusic.SetSoundTime(GameControl.control.gameIntroMusicMS); script_GameIntroMusic.Play(true); StartCoroutine(GetScores()); }
void Awake() { trans_BlipSound = Instantiate(trans_BlipSound) as Transform; script_BlipSound = trans_BlipSound.gameObject.GetComponent<StayAwakeSound>(); }