fp: Add projectile attack

This commit is contained in:
2023-10-05 21:10:50 +11:00
parent aed29a9f50
commit 5f8344ddda
7 changed files with 103 additions and 23 deletions
+4
View File
@@ -22,6 +22,7 @@ enum FP_GameEntityFlag
FP_GameEntityFlag_PointOfInterestHeart = 1 << 11,
FP_GameEntityFlag_CameraTracking = 1 << 14,
FP_GameEntityFlag_BuildZone = 1 << 15,
FP_GameEntityFlag_TTL = 1 << 16,
};
enum FP_GameShapeType
@@ -150,6 +151,7 @@ struct FP_GameEntity
FP_Meters sprite_height;
FP_GameEntityAction action;
FP_Meters base_acceleration_per_s;
Dqn_V2 constant_acceleration_per_s;
Dqn_V2 velocity;
// Extra animations that are to be executed, but, don't affect the state
@@ -189,6 +191,8 @@ struct FP_GameEntity
Dqn_V2 local_pos;
Dqn_f64 alive_time_s;
Dqn_FArray<FP_GameShape, 4> shapes;
Dqn_FArray<FP_GameEntityHandle, 4> projectiles;
uint64_t ttl_end_timestamp;
};
struct FP_GameEntityIterator