blob: 3edec59e7fc6dada5880d991ecd97022aa5550c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include "utils.h"
#include "world.h"
#ifndef PLAYER_H
#define PLAYER_H
#define PLAYER_WIDTH 1.0
#define PLAYER_HEIGHT 2.0
#define PLAYER_SPEED 8.0
#define PLAYER_RUN_SPEED 16.0
#define PLAYER_MAX_SELECT_DISTANCE 10.0
typedef struct {
Vector3 position;
Vector3 direction;
Vector3 velocity;
Vector3 driftDirection;
float speed;
float bobble;
BoundingBox relativeBox;
BoundingBox box;
Camera camera;
Vector2 cameraAngle;
WorldUID selectedEntity;
bool isInteracting;
} Player;
Player createPlayer();
void updatePlayer(Player* player, Game* game);
#endif
|