aboutsummaryrefslogtreecommitdiff
path: root/src/entities/antifaShip.c
diff options
context:
space:
mode:
authornathansmithsmith <thenathansmithsmith@gmail.com>2023-07-07 00:57:19 -0600
committernathansmithsmith <thenathansmithsmith@gmail.com>2023-07-07 00:57:19 -0600
commit028cf5d33d99274deea9567159a4eb07c13ef85c (patch)
treeb2d9f0ae8fb640fdbe1a41114c7c8314f9223103 /src/entities/antifaShip.c
parent416a5cbab21c480ae9e85b07fd9424452cbcb611 (diff)
This fucker is flying
Diffstat (limited to 'src/entities/antifaShip.c')
-rw-r--r--src/entities/antifaShip.c27
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));
+}