ayin/colorgame.ayin
2025-12-20 18:10:59 +02:00

32 lines
513 B
Text

let setup = fn() {
return {
.color: {
.r: random_u8(),
.g: random_u8(),
.b: random_u8(),
},
.rect: {
.dimensions: {
.x: 100,
.y: 100,
.w: 100,
.h: 100,
},
.color: {
.r: random_u8(),
.g: random_u8(),
.b: random_u8(),
},
},
};
}
let update = fn(state, input) {
let delta = get_frame_time();
return state;
}
let draw = fn(state) {
frame_clear(state.color.r, state.color.g, state.color.b);
draw_rectangle(state.rect.dimensions, state.rect.color);
}