Add weapons

This commit is contained in:
2024-01-06 19:54:22 +01:00
parent dbc0ce5981
commit f667614cfe
398 changed files with 1209 additions and 66 deletions

View File

@@ -3,6 +3,8 @@
#include "../game_state.h"
ecs_entity_t renderCollidersSystem;
ecs_entity_t renderOrientDirSystem;
ecs_entity_t renderArmPositionSystem;
ecs_entity_t renderDebugPathSystem;
ECS_DTOR(SpatialGridID, gridID, {
@@ -43,6 +45,7 @@ void setupSystems() {
ECS_SYSTEM(ECS, entityMoveToTarget, EcsOnUpdate, Position, Velocity, TargetPosition, Steering);
ECS_SYSTEM(ECS, entityFollowPath, EcsOnUpdate, Path);
ECS_SYSTEM(ECS, entityUpdateArms, EcsOnUpdate, Position, Velocity, Rotation, Orientation, Arms);
ECS_SYSTEM(ECS, handleUnitActionsSystem, EcsOnUpdate, UnitAction);
ECS_SYSTEM(ECS, updateUnitAISystem, EcsOnUpdate, UnitAI, UnitAction);
@@ -56,9 +59,14 @@ void setupSystems() {
ECS_SYSTEM(ECS, renderDebugPath, EcsOnUpdate, Path);
ECS_SYSTEM(ECS, renderColliders, EcsOnUpdate, Position, Size);
ECS_SYSTEM(ECS, renderRotationDirection, EcsOnUpdate, Position, Rotation);
ECS_SYSTEM(ECS, renderOrientationDirection, EcsOnUpdate, Position, Orientation);
ECS_SYSTEM(ECS, renderArmPosition, EcsOnUpdate, Position, Arm);
renderDebugPathSystem = renderDebugPath;
renderOrientDirSystem = renderOrientationDirection;
renderArmPositionSystem = renderArmPosition;
renderCollidersSystem = renderColliders;
ecs_enable(ECS, renderOrientDirSystem, false);
ecs_enable(ECS, renderArmPositionSystem, false);
}