protected override void Draw(GameTime gameTime) { OnPreDraw.Raise(this, new GameTimeEventArgs(gameTime)); OnDraw.Raise(this, new GameTimeEventArgs(gameTime)); base.Draw(gameTime); OnPostDraw.Raise(this, new GameTimeEventArgs(gameTime)); }
/// <summary> /// Executes Draw events. /// </summary> internal static void CallDrawEvents() { OnPreDraw?.Invoke(); foreach (var scene in Scenes) { if (scene.Visible) { CurrentScene = scene; scene.Draw(); } } OnPostDraw?.Invoke(); }