public override void Initialize() { agentRigidBody = GetComponent <Rigidbody>(); gameAreaHandler = area.GetComponent <GameAreaHandler>(); gameSettingsHandler = FindObjectOfType <GameSettingsHandler>(); gamePointsHandler = area.GetComponentInChildren <GamePointsHandler>(); ResetParams = Academy.Instance.EnvironmentParameters; }
private void Start() { if (GameSettingsHandler._inst != null) { GameSettings = GameSettingsHandler._inst; } if (GameSettings != null) { InitSettingsMenu(); } }
private void Awake() { // Confirm singleton instance is active if (_inst == null) { _inst = this; DontDestroyOnLoad(this); } else if (_inst != this) { GameObject.Destroy(this.gameObject); } }
void Start() { #if UNITY_EDITOR if (_fpsText == null) { Debug.LogWarning("Warning - variable \"_fpsText\" in <" + gameObject.name + "> is null."); } #endif if (GameSettingsHandler._inst != null) { GameSettings = GameSettingsHandler._inst; } currTimeTracked = timeInterval; }