void Awake() { if( s_instance == null ) s_instance = this; else { Debug.LogWarning( "Destroying " + this.gameObject + " because it is a duplicate ApparentWindModuleGuiManager." ); Destroy( this.gameObject ); } }
void Awake() { if (s_instance == null) { s_instance = this; } else { Debug.LogWarning("Destroying " + this.gameObject + " because it is a duplicate ApparentWindModuleGuiManager."); Destroy(this.gameObject); } }
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); }