Skip to main content

cturtle/game_manager

include "cturtle/game_manager";

Types​

GameViewFrame​

Object

FieldTypeWritableDescription
valuesarray<float>yes

width infallible​

infallible fn width() -> float

height infallible​

infallible fn height() -> float

dpiScale infallible​

infallible fn dpiScale() -> float

viewX infallible​

infallible fn viewX() -> float

viewY infallible​

infallible fn viewY() -> float

viewWidth infallible​

infallible fn viewWidth() -> float

viewHeight infallible​

infallible fn viewHeight() -> float

entityX infallible​

infallible fn entityX() -> float

entityY infallible​

infallible fn entityY() -> float

entityZ infallible​

infallible fn entityZ() -> float

entityPresented infallible​

infallible fn entityPresented() -> bool

GameOverlayCircle​

Object

FieldTypeWritableDescription
xfloatyes
yfloatyes
radiusfloatyes
strokefloatyes
rfloatyes
gfloatyes
bfloatyes
afloatyes

Interfaces​

GameAction​

Interface

invoke​

fn invoke()

GameManager​

Interface

init​

fn init()

start​

fn start()

update​

fn update(float dt)

draw​

fn draw(float dt)

overlay​

fn overlay(float dt)

stop​

fn stop()

InteractiveGameManager​

Interface

init​

fn init()

start​

fn start()

update​

fn update(float dt)

draw​

fn draw(float dt)

overlay​

fn overlay(float dt)

stop​

fn stop()

keyDown​

fn keyDown(int key, int modifiers, bool repeated)

keyUp​

fn keyUp(int key, int modifiers, bool repeated)

keyPress​

fn keyPress(int key, int modifiers, bool repeated)

mouseDown​

fn mouseDown(int button, float x, float y, int modifiers)

mouseUp​

fn mouseUp(int button, float x, float y, int modifiers)

mouseMove​

fn mouseMove(float x, float y, float dx, float dy, int modifiers)

mouseScroll​

fn mouseScroll(float x, float y, int modifiers)

resized​

fn resized(
int width,
int height,
int framebufferWidth,
int framebufferHeight)

focus​

fn focus()

unfocus​

fn unfocus()

GameManagerCommand​

Interface

command​

fn command(string text)

GameTouchHandler​

Interface

touch​

fn touch(int phase, int identifier, float x, float y, bool changed)

Functions​

game_send_manager_command infallible​

infallible fn game_send_manager_command(string name, string command) -> task<bool>

game_set_fps_counter_enabled infallible​

infallible fn game_set_fps_counter_enabled(bool enabled) -> task<bool>

game_toggle_fps_counter infallible​

infallible fn game_toggle_fps_counter() -> task<bool>

game_configure_sprite_systems infallible​

infallible fn game_configure_sprite_systems(int instancesPerBuffer) -> task<bool>

game_configure_spatial infallible​

infallible fn game_configure_spatial(
float cellSize,
int shardCount,
int maxEvents,
bool indexPointlike) -> task<bool>

game_worker_count infallible​

infallible fn game_worker_count() -> int

game_enable_touch_fullscreen_prompt infallible​

infallible fn game_enable_touch_fullscreen_prompt() -> task<bool>

game_enable_hang_diagnostics infallible​

infallible fn game_enable_hang_diagnostics(
string reportName,
string endpoint) -> task<bool>

gameRunAction​

fn gameRunAction(GameAction action)

game_register_manager infallible​

infallible fn game_register_manager(string name, GameManager manager) -> task<bool>

game_register_interactive_manager infallible​

infallible fn game_register_interactive_manager(
string name,
InteractiveGameManager manager) -> task<bool>

game_bind_manager_commands infallible​

infallible fn game_bind_manager_commands(
string name,
GameManagerCommand manager) -> task<bool>

game_bind_touch_input infallible​

infallible fn game_bind_touch_input(
string name,
GameTouchHandler handler) -> task<bool>

gameViewFrame infallible​

infallible fn gameViewFrame() -> GameViewFrame

gameCameraFrame​

tree gameCameraFrame(int camera, Entity entity, GameViewFrame frame) -> bool

gameCameraOrthographicCreate​

tree gameCameraOrthographicCreate(float nearClip, float farClip) -> int

gameCameraOrthographicSet​

tree gameCameraOrthographicSet(
int camera,
float x,
float y,
float width,
float height) -> bool

gameOverlayCircles​

tree gameOverlayCircles(array<GameOverlayCircle> circles) -> bool