Add idle animation
This commit is contained in:
10
game/main.c
10
game/main.c
@@ -134,6 +134,11 @@ bool init(void *userData) {
|
||||
.userDataSize=sizeof(ecs_entity_t)
|
||||
});
|
||||
|
||||
ECS_OBSERVER(ECS, entitySpatialRemoved, EcsOnRemove, Position, SpatialGridID);
|
||||
ECS_OBSERVER(ECS, entityPathRemoved, EcsOnRemove, Path);
|
||||
|
||||
ECS_OBSERVER(ECS, entitySetAnimationState, EcsOnSet, Animation, AnimationType);
|
||||
|
||||
bzTileMapOverrideLayer(&game->map, LAYER_TREES, initTreesLayer);
|
||||
bzTileMapOverrideLayer(&game->map, LAYER_TREES2, initTreesLayer);
|
||||
|
||||
@@ -142,13 +147,12 @@ bool init(void *userData) {
|
||||
bzTileMapOverrideObjectGroup(&game->map, OBJECTS_GAME, initGameObjectsLayer);
|
||||
bzTileMapOverrideObjectGroup(&game->map, OBJECTS_ENTITIES, initEntityObjectsLayer);
|
||||
|
||||
ECS_OBSERVER(ECS, entitySpatialRemoved, EcsOnRemove, Position, SpatialGridID);
|
||||
ECS_OBSERVER(ECS, pathRemoved, EcsOnRemove, Path);
|
||||
|
||||
ECS_SYSTEM(ECS, entityUpdateSpatialID, EcsOnUpdate, Position, Size, Velocity, SpatialGridID);
|
||||
ECS_SYSTEM(ECS, entityUpdateKinematic, EcsOnUpdate, Position, Rotation, Velocity, AngularVelocity, SteeringOutput);
|
||||
ECS_SYSTEM(ECS, entityFollowPath, EcsOnUpdate, Position, Rotation, Velocity, AngularVelocity, SteeringOutput, Path);
|
||||
|
||||
ECS_SYSTEM(ECS, entityUpdateAnimation, EcsOnUpdate, Animation, TextureRegion);
|
||||
|
||||
ECS_SYSTEM(ECS, renderDebugPath, EcsOnUpdate, Path);
|
||||
|
||||
ECS_SYSTEM(ECS, renderTerrain, EcsOnUpdate, Position, Size, Rotation, TextureRegion, TextureTerrain);
|
||||
|
||||
Reference in New Issue
Block a user