PUT_CAMERA command

It instantly places the camera centered at the given point.
This commit is contained in:
Edgaru089 2024-04-28 19:16:43 +08:00
parent 41b9c38411
commit 2fd8e669c5
2 changed files with 6 additions and 0 deletions

View File

@ -171,6 +171,11 @@ static void _app_LevelCommand(App *app, char *cmd) {
entity_Commit(app->entity, e);
}
CMD("PUT_CAMERA") {
Vec2 center = readvec2();
app->camera->cam = box2_FromCenter(center, app->camera->screen.size);
}
CMD("CUTOFF") {
app->player->cutoff = TOKEN_DOUBLE;
}

View File

@ -1,5 +1,6 @@
CUTOFF 1000
BACKGROUND 90 90 90
PUT_CAMERA 200 400
HITBOX -245 250 1427 44
PLAYER 600 250
HITBOX -200 -270 100 600