void Start() { SetResultText(); sound = SoundBehaviour.FindInstance(); sound.PlayBGM(menuBGM); }
void Start() { lastMenuIndex = LastMenuIndexBehaviour.FindInstance(); menus = new MenuBehaviour[] { startMenu, resultsMenu, quitMenu }; menuI = lastMenuIndex.GetIndex(); UpdateMenu(); sound = SoundBehaviour.FindInstance(); sound.PlayBGM(menuBGM); }
void Start() { screenMinPos = Camera.main.ScreenToWorldPoint(Vector3.zero); screenMaxPos = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height, 0.0f)); gameStatus = GAME_STATUS_STARTED; life = initialLife; lifeText.text = life.ToString(); score = 0; scoreText.text = score.ToString(); InvokeRepeating("SpawnNil2", introSec + spawnClockSec, spawnClockSec); InvokeRepeating("AccerateSpawnClock", introSec + accerateSpawnClockClockSec, accerateSpawnClockClockSec); sound = SoundBehaviour.FindInstance(); sound.PlayBGMWithRestart(gameBGM); }