diff options
Diffstat (limited to 'src/entities/antifaShip.c')
-rw-r--r-- | src/entities/antifaShip.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/entities/antifaShip.c b/src/entities/antifaShip.c new file mode 100644 index 0000000..2552d24 --- /dev/null +++ b/src/entities/antifaShip.c @@ -0,0 +1,27 @@ +#include "antifaShip.h" +#include <raylib.h> + +void initAntifaShip(Entity * entity) { + entity->model = LoadModel("/home/nathan/Documents/KillaFacsista/assets/antifaShip.obj"); +} + +void closeAntifaShip(Entity * entity) { + UnloadModel(entity->model); +} + +void updateAntifaShip(Game * game, Entity * entity, EntityId id) { +} + +void drawAntifaShip(Game * game, Entity * entity, EntityId id) { + entityDraw(entity); + + Vector3 stick = (Vector3){ + GetGamepadAxisMovement(0, 1), + -GetGamepadAxisMovement(0, 0), + GetGamepadAxisMovement(0, 2) + }; + + stick = Vector3Scale(stick, 0.5); + + entityJoystickControl(entity, stick, fabs(GetGamepadAxisMovement(0, 3) * 50.0 + 5.0)); +} |