void Awake() { if( s_instance == null ) { s_instance = this; } else { Debug.LogWarning( gameObject.name + " is being deleted because it is a duplicate " + this.name + "."); } }
void Awake() { if (s_instance == null) { s_instance = this; } else { Debug.LogWarning(gameObject.name + " is being deleted because it is a duplicate " + this.name + "."); } }
void Start() { // Set up variables for camera lerp if (mainCamera == null) { mainCamera = Camera.main; } if (lowWindCameraPos == null) { lowWindCameraPos = GameObject.Find("LowWindCameraPos").transform; } if (highWindCameraPos == null) { highWindCameraPos = GameObject.Find("HighWindCameraPos").transform; } // Get references to singletons guiManager = ApparentWindModuleGuiManager.s_instance; // guiManager.UpdateTrueWindSpeed( lowWindSpeed ); // guiManager.UpdateBoatSpeed( lowBoatSpeed ); apparentWindBoatControl = ApparentWindBoatControl.s_instance; ChangeState(GameState.Intro); }