private void Reset() { _sharkManager = FindObjectOfType <SharkManager>(); _rayMouth = FindObjectOfType <RayMouth>(); State = GameState.IDLE; _difficulty = 0f; _nextFightingTime = float.MaxValue; _fightingTime = float.MinValue; }
} // guarantee this will be always a singleton only - can't use the constructor! private void Start() { _sharkManager = FindObjectOfType <SharkManager>(); _rayMouth = FindObjectOfType <RayMouth>(); GetGlobalVars(); _musicSource.loop = true; _musicSource.clip = _eatingMusic; _musicSource.Play(); Reset(); }