aboutsummaryrefslogtreecommitdiff
path: root/src/entities/antifaShip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/entities/antifaShip.c')
-rw-r--r--src/entities/antifaShip.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/entities/antifaShip.c b/src/entities/antifaShip.c
index 1944053..f43a7df 100644
--- a/src/entities/antifaShip.c
+++ b/src/entities/antifaShip.c
@@ -1,28 +1,21 @@
#include "antifaShip.h"
-#include <raylib.h>
+#include "game.h"
-void initAntifaShip(Entity * entity) {
- entity->model = LoadModel("/home/nathan/Documents/KillaFacsista/assets/antifaShip.obj");
+void initAntifaShip(Entity * entity, Game * game) {
+ entity->model = &game->assets.models[ANTIFA_SHIP_ASSET];
entity->useAcceleration = true;
entity->acceleration = (EntityAcceleration){
.speedUp = 30.0,
.speedDown = 15,
- .rotationUp = (Vector3){0.6, 0.6, 0.6},
- .rotationDown = (Vector3){0.6, 0.6, 0.6}
+ .rotation = (Vector3){0.7, 0.7, 0.7}
};
}
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),
@@ -33,3 +26,7 @@ void drawAntifaShip(Game * game, Entity * entity, EntityId id) {
entityJoystickControl(entity, stick, fabs(GetGamepadAxisMovement(0, 3) * 300.0));
}
+
+void drawAntifaShip(Game * game, Entity * entity, EntityId id) {
+ entityDraw(entity);
+}