summaryrefslogtreecommitdiff
path: root/src/player.c
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-03-17 11:06:37 +0100
committerkdx <kikoodx@paranoici.org>2023-03-17 11:06:37 +0100
commit19983764a79acfa3f74a730a90e21cdb9813309c (patch)
tree97bbb30a47c2f5f3d78c03cf406f73e6d6745249 /src/player.c
parent79364a7de0bd0cf7d31d1ba8a5442099ccb7b1a7 (diff)
downloadhyperultra-19983764a79acfa3f74a730a90e21cdb9813309c.tar.gz
collide and move
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/player.c b/src/player.c
index 49dddde..9778746 100644
--- a/src/player.c
+++ b/src/player.c
@@ -7,8 +7,9 @@
static void
player_update(Entity *this, Game *g)
{
- (void)g;
- this->pos[1] = this->pos[0] += 1;
+ this->vel[0] = 1.2;
+ this->vel[1] += 0.1;
+ entity_move(this, g);
}
static void
@@ -25,6 +26,8 @@ void
player_init(Entity *this)
{
memset(this, 0, sizeof(*this));
+ this->pos[0] = 16;
+ this->pos[1] = 16;
this->type = ET_PLAYER;
this->update = player_update;
this->draw = player_draw;