care-game 0.0.1

Simple and easy game framework inspired by LÖVE.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// This example shows off how to add "global" state to the application.
// Due to the way this is implemented, the state variables are only accesable in the init, update and draw functions.

#[care::state]
static time: f32 = 0.0;

#[care::update]
fn update(delta: f32) {
    time += delta;
}

#[care::draw]
fn draw() {
    care::graphics::rectangle((50, 50), (50.0 * time.sin(), 50.0 * time.cos()));
}

care::main!();