update readme
This commit is contained in:
parent
fba7b26528
commit
df35e2240a
1 changed files with 10 additions and 10 deletions
20
readme.md
20
readme.md
|
|
@ -5,32 +5,32 @@ Ayin
|
||||||
- Tiny, procedural, gamedev
|
- Tiny, procedural, gamedev
|
||||||
- only user input is controller input
|
- only user input is controller input
|
||||||
- Live code reload
|
- Live code reload
|
||||||
- int, float, string, char, bool, key
|
- int, float, string, char, bool
|
||||||
- arrays and maps
|
- arrays and objects
|
||||||
- variables and functions
|
- variables and functions
|
||||||
- if, loop, continue, break, return
|
- if, loop, break, return
|
||||||
- function call
|
- function calls
|
||||||
- first class functions
|
- first class functions
|
||||||
|
|
||||||
```
|
```
|
||||||
let setup = fn() {
|
let setup = fn() {
|
||||||
return {
|
return {
|
||||||
.player: { .position: { .x: 10, .y: 20 }, },
|
.player: { .position: { .x: 10, .y: 20 }, },
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let update = fn(state, events) {
|
let update = fn(state, events) {
|
||||||
let new = 100;
|
let new = 100
|
||||||
state.player.position.x = new;
|
state.player.position.x = new
|
||||||
return state;
|
state
|
||||||
}
|
}
|
||||||
|
|
||||||
let draw = fn(frame, state) {
|
let draw = fn(frame, state) {
|
||||||
frame.clear(0,0,0);
|
frame_clear(0,0,0)
|
||||||
}
|
}
|
||||||
|
|
||||||
let migrate = fn(state) {
|
let migrate = fn(state) {
|
||||||
return { .player: { .pos: state.player.position } };
|
state
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue