Table of Contents

Class GameEngine

Namespace
Crux.Core
Assembly
Crux.dll
public class GameEngine : GameWindow, IDisposable
Inheritance
NativeWindow
GameWindow
GameEngine
Implements
Inherited Members
GameWindow.Run()
GameWindow.SwapBuffers()
GameWindow.Close()
GameWindow.OnRenderThreadStarted()
GameWindow.TimeSinceLastUpdate()
GameWindow.ResetTimeSinceLastUpdate()
GameWindow.Dispose()
GameWindow.IsRunningSlowly
GameWindow.IsMultiThreaded
GameWindow.RenderFrequency
GameWindow.RenderTime
GameWindow.UpdateTime
GameWindow.UpdateFrequency
GameWindow.ExpectedSchedulerPeriod
GameWindow.Load
GameWindow.Unload
GameWindow.UpdateFrame
GameWindow.RenderThreadStarted
GameWindow.RenderFrame
NativeWindow.Focus()
NativeWindow.MakeCurrent()
NativeWindow.NewInputFrame()
NativeWindow.PointToClient(Vector2i)
NativeWindow.PointToScreen(Vector2i)
NativeWindow.IsKeyDown(Keys)
NativeWindow.IsKeyPressed(Keys)
NativeWindow.IsKeyReleased(Keys)
NativeWindow.IsMouseButtonDown(MouseButton)
NativeWindow.IsMouseButtonPressed(MouseButton)
NativeWindow.IsMouseButtonReleased(MouseButton)
NativeWindow.OnMove(WindowPositionEventArgs)
NativeWindow.OnFramebufferResize(FramebufferResizeEventArgs)
NativeWindow.OnRefresh()
NativeWindow.OnJoystickConnected(JoystickEventArgs)
NativeWindow.OnFocusedChanged(FocusedChangedEventArgs)
NativeWindow.OnKeyDown(KeyboardKeyEventArgs)
NativeWindow.OnTextInput(TextInputEventArgs)
NativeWindow.OnKeyUp(KeyboardKeyEventArgs)
NativeWindow.OnMouseLeave()
NativeWindow.OnMouseEnter()
NativeWindow.OnMouseDown(MouseButtonEventArgs)
NativeWindow.OnMouseUp(MouseButtonEventArgs)
NativeWindow.OnMouseMove(MouseMoveEventArgs)
NativeWindow.OnMouseWheel(MouseWheelEventArgs)
NativeWindow.OnMinimized(MinimizedEventArgs)
NativeWindow.OnMaximized(MaximizedEventArgs)
NativeWindow.OnFileDrop(FileDropEventArgs)
NativeWindow.CenterWindow()
NativeWindow.CenterWindow(Vector2i)
NativeWindow.WindowPtr
NativeWindow.KeyboardState
NativeWindow.JoystickStates
NativeWindow.MousePosition
NativeWindow.MouseState
NativeWindow.IsAnyKeyDown
NativeWindow.IsAnyMouseButtonDown
NativeWindow.VSync
NativeWindow.AutoIconify
NativeWindow.Icon
NativeWindow.IsEventDriven
NativeWindow.ClipboardString
NativeWindow.Title
NativeWindow.API
NativeWindow.Profile
NativeWindow.Flags
NativeWindow.APIVersion
NativeWindow.Context
NativeWindow.CurrentMonitor
NativeWindow.IsFocused
NativeWindow.IsVisible
NativeWindow.Exists
NativeWindow.IsExiting
NativeWindow.WindowState
NativeWindow.WindowBorder
NativeWindow.Bounds
NativeWindow.Location
NativeWindow.ClientLocation
NativeWindow.Size
NativeWindow.ClientSize
NativeWindow.FramebufferSize
NativeWindow.MinimumSize
NativeWindow.MaximumSize
NativeWindow.AspectRatio
NativeWindow.ClientRectangle
NativeWindow.IsFullscreen
NativeWindow.Cursor
NativeWindow.CursorState
NativeWindow.RawMouseInput
NativeWindow.SupportsRawMouseInput
NativeWindow.HasTransparentFramebuffer
NativeWindow.Move
NativeWindow.Resize
NativeWindow.FramebufferResize
NativeWindow.Refresh
NativeWindow.Closing
NativeWindow.Minimized
NativeWindow.Maximized
NativeWindow.JoystickConnected
NativeWindow.FocusedChanged
NativeWindow.KeyDown
NativeWindow.TextInput
NativeWindow.KeyUp
NativeWindow.MouseLeave
NativeWindow.MouseEnter
NativeWindow.MouseDown
NativeWindow.MouseUp
NativeWindow.MouseMove
NativeWindow.MouseWheel
NativeWindow.FileDrop

Constructors

GameEngine(GameWindowSettings, NativeWindowSettings)

public GameEngine(GameWindowSettings gameWindowSettings, NativeWindowSettings nativeWindowSettings)

Parameters

gameWindowSettings GameWindowSettings
nativeWindowSettings NativeWindowSettings

Fields

ActiveScene

public Scene? ActiveScene

Field Value

Scene

BuildNumber

public static int BuildNumber

Field Value

int

Camera

public CameraComponent? Camera

Field Value

CameraComponent

DebugDisplayPositions

public List<Vector3> DebugDisplayPositions

Field Value

List<Vector3>

Instantiated

public List<GameObject> Instantiated

Field Value

List<GameObject>

OnEngineReadyCallback

public Action? OnEngineReadyCallback

Field Value

Action

Resolution

public Vector2i Resolution

Field Value

Vector2i

Version

public static readonly VersionData Version

Field Value

VersionData

deltaTime

public float deltaTime

Field Value

float

fixedDeltaTime

public float fixedDeltaTime

Field Value

float

fixedTotalTime

public float fixedTotalTime

Field Value

float

totalTime

public float totalTime

Field Value

float

Properties

public static GameEngine Link { get; }

Property Value

GameEngine

Methods

CloneGameObject(GameObject)

public GameObject CloneGameObject(GameObject toCopy)

Parameters

toCopy GameObject

Returns

GameObject

GetApplicationInformation()

public static string GetApplicationInformation()

Returns

string

GetEngineShortName()

public static string GetEngineShortName()

Returns

string

GetGameShortName()

public static string GetGameShortName()

Returns

string

GetOperatingSystem()

public static string GetOperatingSystem()

Returns

string

GetSystemInformation()

public static string GetSystemInformation()

Returns

string

GetWindowShortName()

public static string GetWindowShortName()

Returns

string

InDebugMode()

public static bool InDebugMode()

Returns

bool

InstantiateGameObject(string)

public GameObject InstantiateGameObject(string name = "")

Parameters

name string

Returns

GameObject

OnLoad()

Run immediately after Run() is called.

protected override void OnLoad()

OnRenderFrame(FrameEventArgs)

Run when the window is ready to render. This is called after OpenTK.Windowing.Desktop.GameWindow.OnUpdateFrame(OpenTK.Windowing.Common.FrameEventArgs).

protected override void OnRenderFrame(FrameEventArgs e)

Parameters

e FrameEventArgs

OnResize(ResizeEventArgs)

Raises the OpenTK.Windowing.Desktop.NativeWindow.Resize event.

protected override void OnResize(ResizeEventArgs e)

Parameters

e ResizeEventArgs

A OpenTK.Windowing.Common.ResizeEventArgs that contains the event data.

OnUnload()

Run when the window is about to close.

protected override void OnUnload()

OnUpdateFrame(FrameEventArgs)

Run when the window is ready to update. This is called before OpenTK.Windowing.Desktop.GameWindow.OnRenderFrame(OpenTK.Windowing.Common.FrameEventArgs).

protected override void OnUpdateFrame(FrameEventArgs e)

Parameters

e FrameEventArgs

SetupDebugCanvas()

public CanvasComponent SetupDebugCanvas()

Returns

CanvasComponent

Events

OnUpdateCallback

public event Action? OnUpdateCallback

Event Type

Action