Add Floaty text particles

This commit is contained in:
2024-02-07 17:58:55 +01:00
parent 6c1d0dfdb2
commit e595ec9333
7 changed files with 91 additions and 13 deletions

View File

@@ -41,6 +41,18 @@ extern ECS_COMPONENT_DECLARE(Owner);
* Particle components
*********************************************************/
typedef struct FloatyTextParticle {
Vector2 pos;
Vector2 speed;
Color color;
Color targetColor;
char text[12];
f32 txtSize;
f32 duration;
f32 elapsed;
} FloatyTextParticle;
extern ECS_COMPONENT_DECLARE(FloatyTextParticle);
typedef struct EmitterAttachment {
ecs_entity_t baseEntity;
Vector2 offset;
@@ -185,7 +197,10 @@ extern ECS_COMPONENT_DECLARE(Easing);
/**********************************************************
* Event components
*********************************************************/
typedef Rectangle HitBox;
typedef struct DamageEvent {
HitBox hitbox;
f32 amount;
} DamageEvent;
@@ -202,7 +217,6 @@ typedef struct DamageEvent {
* Gameplay components
*********************************************************/
typedef Rectangle HitBox;
extern ECS_COMPONENT_DECLARE(HitBox);
extern ECS_COMPONENT_DECLARE(BzBTState);