Add tower firing

This commit is contained in:
2024-02-10 11:25:02 +01:00
parent e654c47446
commit 1c6fab51c6
6 changed files with 119 additions and 12 deletions

View File

@@ -280,14 +280,23 @@ typedef struct Tower {
f32 range;
f32 minDamage;
f32 maxDamage;
f32 damageFalloff;
f32 damageRadius;
f32 projectileSpeed;
f32 projectileRadius;
i32 projectileDamageCount;
f32 fireCooldown;
f32 fireElapsed;
} Tower;
extern ECS_COMPONENT_DECLARE(Tower);
typedef struct Projectile {
Vector2 target;
f32 radius;
f32 damage;
ecs_entity_t lastDamaged;
i32 damageCount;
} Projectile;
extern ECS_COMPONENT_DECLARE(Projectile);
#define BUILDING_MAX_RECRUIT_SLOTS 4
typedef struct BuildingRecruitSlot {
EntityType entityType;