public override void Dispose() { GameFramework.UnregisterFromUpdate(this); Global.gEnv.pHardwareMouse.RemoveListener(this); base.Dispose(); }
/// <summary> /// Called by framework. Do not call directly. /// </summary> public static void Instanciate() { _instance = new Screen(); _instance._lastWidth = Width; _instance._lastHeight = Height; GameFramework.RegisterForUpdate(_instance); }
/// <summary> /// Called by framework. Do not call directly. /// </summary> public static void Destroy() { if (_instance != null) { GameFramework.UnregisterFromUpdate(_instance); _instance = null; } }
/// <summary> /// Called by framework. Do not call directly. /// </summary> public static void Instantiate() { _instance = new Mouse(); Global.gEnv.pHardwareMouse.AddListener(_instance); GameFramework.RegisterForUpdate(_instance); HitEntityId = 0; HitEntityUV = new Vec2(); }
/// <summary> /// Called by framework. Do not call directly. /// </summary> public static void Destroy() { if (_instance != null) { GameFramework.UnregisterFromUpdate(_instance); Global.gEnv.pHardwareMouse.RemoveListener(_instance); _instance.Dispose(); _instance = null; } }
public Timer(float time, bool looping, Action onTimerExpired = null) { GameFramework.RegisterForUpdate(this); this._timeToLive = time; this._onTimerExpired = onTimerExpired; this.Looping = looping; _startTime = Engine.Timer.GetCurrTime(); }
/// <summary> /// Called by framework. Do not call directly. /// </summary> public static void Destroy() { _updateReceivers.Clear(); if (_instance != null) { if (Global.gEnv != null && Env.Game != null && Env.Game.GetIGameFramework() != null) { Env.Game.GetIGameFramework().UnregisterListener(_instance); } _instance.Dispose(); _instance = null; } }
} ///< Indicates whether CryEngine is run in Editor mode. /// <summary> /// Called by framework. Do not call directly. /// </summary> public static void Initialize() { if (_isInitialized) { return; } _isInitialized = true; SystemHandler.Instantiate(); CryEngine.Input.Instanciate(); Screen.Instanciate(); CryEngine.Mouse.Instantiate(); SceneManager.Instantiate(); GameFramework.Instantiate(); LevelSystem.Instantiate(); }
/// <summary> /// Called by framework. Do not call directly. /// </summary> public static void Shutdown() { if (!_isInitialized) { return; } _isInitialized = false; //EntityFramework.Destroy (); GameFramework.Destroy(); SceneManager.Destroy(); LevelSystem.Destroy(); CryEngine.Mouse.Destroy(); Screen.Destroy(); CryEngine.Input.Destroy(); SystemHandler.Destroy(); }
public DeferredMouseListener(Mouse mouse) { _mouse = mouse; GameFramework.RegisterForUpdate(this); Global.gEnv.pHardwareMouse.AddListener(this); }
/// <summary> /// Called by framework. Do not call directly. /// </summary> public static void Instantiate() { _instance = new GameFramework(); Env.Game.GetIGameFramework().RegisterListener(_instance, "MonoGameFramework", EFRAMEWORKLISTENERPRIORITY.FRAMEWORKLISTENERPRIORITY_DEFAULT); _instance._monoTargetFps = Env.Console.GetCVar("mono_targetfps"); }
/// <summary> /// Called by framework. Do not call directly. /// </summary> public static void Destroy() { GameFramework.UnregisterFromUpdate(_instance); _scenes.Clear(); _instance = null; }
/// <summary> /// Called by framework. Do not call directly. /// </summary> public static void Instantiate() { _instance = new SceneManager(); GameFramework.RegisterForUpdate(_instance); }
public void Destroy() { GameFramework.UnregisterFromUpdate(this); _onTimerExpired = null; }
void AddListener() { GameFramework.RegisterForUpdate(this); Global.gEnv.pHardwareMouse.AddListener(this); }