//====================================================================================== // Inherited methods //====================================================================================== private void Awake() { if (Instance != null) { Destroy(gameObject); } Instance = this; IsPlayerFreezing = false; IsRivalFreezing = false; willRivalReleaseBalloon = false; PresentGameResult = GameResult.Undone; playerBalloonIndex = 0; rivalBalloonIndex = 0; PlayerScore = 0; RivalScore = 0; PresentGameState = GameStatus.Standby; keyboardInputPitchMultiplier = 0.6f; joyConInputPitchMultiplier = 1.6f; keyboardInputLength = 0.0f; PlayerBalloon = null; rivalBalloon = null; inflatedAirVolume = 0.0f; keyboardInputCount = 0; keyboardInputPerSec = 0.0f; keyboardNoInputLength = 0.0f; isNoInput = true; keyboardInputLength = 0.0f; GameTime = 0.0f; balloonSpawnList = new List <Balloon.BalloonType>(); playableDirector = GetComponent <PlayableDirector>(); if (!isTutorial) { playableDirector.Play(gameStartTimelineAssert); } GameTimeLimit = gameTimeLimit; PlayerReleasedBalloons = new List <Balloon>(); RivalReleasedBalloons = new List <Balloon>(); SortedPlayerReleasedBalloons = new List <List <Balloon> >(); SortedRivalReleasedBalloons = new List <List <Balloon> >(); rivalPresentInputSpeed = rivalInitialInputSpeed; playerJoyConInputSpeed = 0.0f; playerKeyboardInputSpeed = 0.0f; // Settings SpawnPlayerBalloon(); if (!isTutorial) { SpawnRivalBalloon(); } foreach (var i in aiCheckPoint) { aiCheckPointQueue.Enqueue(i); } }
private void OnDestroy() { Instance = null; }