player is now managed by game world
This commit is contained in:
parent
8275732530
commit
0704378f1a
|
@ -28,7 +28,7 @@ void play() {
|
||||||
input_add_key_action(SDL_SCANCODE_F1, &toggle_info_key);
|
input_add_key_action(SDL_SCANCODE_F1, &toggle_info_key);
|
||||||
g_camera.fov = 40;
|
g_camera.fov = 40;
|
||||||
|
|
||||||
player = malloc(sizeof(Player));
|
player = player_new();
|
||||||
player_spawn(player, (Vector){8.25f, 15.f});
|
player_spawn(player, (Vector){8.25f, 15.f});
|
||||||
|
|
||||||
level = level_load("level_0");
|
level = level_load("level_0");
|
||||||
|
@ -36,7 +36,6 @@ void play() {
|
||||||
|
|
||||||
static
|
static
|
||||||
void tick() {
|
void tick() {
|
||||||
Player_as_BehaviourEntity(player).tc->update(player, delta_time());
|
|
||||||
g_camera.transform.position = player->transform.position;
|
g_camera.transform.position = player->transform.position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue