15 const char *
name =
nullptr;
void(*)(context &ctx) sys_fnc
Một system là một hàm thường nhận context của engine.
Definition _mod.h:15
scene_handle scene_register(context &ctx, const scene_desc &desc)
Đăng ký một scene.
scene_handle scene_current(const context &ctx)
Scene đang chạy.
scene_handle scene_find(const context &ctx, const char *name)
Tìm scene theo tên.
f32 scene_transition_cover(const context &ctx)
Độ phủ hiện tại của hiệu ứng chuyển scene.
void scene_fade(context &ctx, scene_handle scene, const scene_transition &transition={})
Chuyển sang scene khác với hiệu ứng mờ dần (fade).
bool scene_transitioning(const context &ctx)
Có đang chuyển scene bằng scene_fade() không.
void scene_set(context &ctx, scene_handle scene)
Chuyển sang một scene khác.
float f32
Số thực 32 bit.
Definition _types.h:28
Màu gồm đỏ, xanh lá, xanh dương và alpha.
Definition _types.h:64
Mô tả một scene, dùng với scene_register().
Definition njin_scene.h:14
sys_fnc on_exit
Gọi một lần khi rời scene. Có thể null.
Definition njin_scene.h:17
sys_fnc on_enter
Gọi một lần khi vào scene. Có thể null.
Definition njin_scene.h:16
const char * name
Tên scene, phải là duy nhất.
Definition njin_scene.h:15
Định danh của một scene, tạo bởi scene_register().
Definition _types.h:139
Hiệu ứng chuyển scene, dùng với scene_fade().
Definition njin_scene.h:59
f32 fade_out
Thời gian phủ màn hình, giây.
Definition njin_scene.h:60
rgba color
Màu phủ.
Definition njin_scene.h:63
f32 hold
Thời gian tối thiểu giữ màn hình kín, giây.
Definition njin_scene.h:61
f32 fade_in
Thời gian mở màn hình, giây.
Definition njin_scene.h:62
sys_fnc draw_loading
Vẽ màn hình loading trong lúc phủ kín, trong không gian màn hình, đè lên màu phủ.
Definition njin_scene.h:70