Add hurt, die animation when taking damage
This commit is contained in:
@@ -46,6 +46,7 @@ bool updateParticle(const Texture2D tex, Particle *particle, f32 dt);
|
||||
|
||||
Particle spawnParticle(const ParticleEmitter *emitter);
|
||||
|
||||
void animationSetState(Animation *anim, AnimType type, bool playInFull);
|
||||
/*
|
||||
* 1: Animation
|
||||
* 2: TextureRegion
|
||||
@@ -117,13 +118,16 @@ void entityUpdateSpatialID(ecs_iter_t *it);
|
||||
void entityUpdateKinematic(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* Big system for updating physics and attacking
|
||||
* 0: Game (singleton) for collisions
|
||||
* 1: Position
|
||||
* 2: HitBox
|
||||
* 2: Velocity
|
||||
* 3: SpatialGridID
|
||||
* 3: Velocity
|
||||
* 4: Unit
|
||||
* 5: Owner
|
||||
* 6: SpatialGridID
|
||||
*/
|
||||
void entityUpdatePhysics(ecs_iter_t *it);
|
||||
void entityUpdate(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* 1: Position
|
||||
@@ -152,7 +156,7 @@ void updateBuildingRecruitment(ecs_iter_t *it);
|
||||
* 2: HitBox
|
||||
* 3: Health
|
||||
*/
|
||||
void renderHealth(ecs_iter_t *it);
|
||||
void renderHealthBar(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* 1: Position
|
||||
@@ -177,6 +181,8 @@ void renderDebugPath(ecs_iter_t *it);
|
||||
* Event Systems
|
||||
**********************************/
|
||||
|
||||
void damageEvent(ecs_entity_t entity, DamageEvent event);
|
||||
|
||||
i32 harvestEvent(ecs_entity_t entity, HarvestEvent event);
|
||||
void depositEvent(ecs_entity_t entity, DepositEvent event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user