Core

Core class

Constructors

this
this(int width, int height, string title)

sets up a game core

Members

Functions

add_manager
T add_manager(T manager)

adds a global manager

destroy
void destroy()

releases all resources and cleans up

draw
void draw()
Undocumented in source. Be warned that the author may not have intended to support it.
initialize
void initialize()

sets up the game

run
void run()

starts the game

update
void update()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

fps
int fps [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
primary_scene
Scene primary_scene [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
scenes
Scene[] scenes [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

exit
void exit()

gracefully exits the game

get_manager
Nullable!T get_manager()
Undocumented in source. Be warned that the author may not have intended to support it.
get_scene
T get_scene()
Undocumented in source. Be warned that the author may not have intended to support it.
load_scenes
void load_scenes(Scene[] new_scenes)

sets the current scenes

Static variables

auto_compensate_hidpi
bool auto_compensate_hidpi;

whether to automatically scale things to compensate for hidpi NOTE: raylib.ConfigFlags.FLAG_WINDOW_HIGHDPI also exists, but we're not using it right now

auto_oversample_hidpi
bool auto_oversample_hidpi;

whether to automatically oversample for hidpi

auto_rescale_mouse_hidpi
bool auto_rescale_mouse_hidpi;

whether to rescale the mouse position to compensate for hidpi

content
ContentManager content;

content manager

debug_render
bool debug_render;

whether to draw debug information

debugger
Debugger debugger;

debugger utility

default_filter_mode
raylib.TextureFilter default_filter_mode;

the default texture filtering mode for render targets

default_resolution
Vector2 default_resolution;

the default render resolution for all scenes

exit_on_escape_pressed
bool exit_on_escape_pressed;

whether to exit when escape pressed

frame_limit
int frame_limit;

the frame limit (used for testing)

headless
bool headless;

whether graphics should be disabled

jar
Jar jar;

type registration container

log
Logger log;

logger utility

managers
Manager[] managers;

global managers

pause_on_focus_lost
bool pause_on_focus_lost;

whether to pause when unfocused

render_oversample
int render_oversample;

oversampling factor for internal rendering

running
bool running;

whether the game is running

sync_render_window_resolution
bool sync_render_window_resolution;

whether to automatically resize the render target to the window size

target_fps
int target_fps;

target frames per second

vr
VRSupport vr;
Undocumented in source.
window
Window window;

game window

Meta