Untitled
Toggle main menu visibility
Loading...
Searching...
No Matches
entity.h
Go to the documentation of this file.
1
5
6
#ifndef ENTITY_H
7
#define ENTITY_H
8
9
#include <stdbool.h>
10
#include "
core/engine_types.h
"
11
12
13
17
extern
State
STATE_REGISTRY
[
MAX_ENTITY_STATES
];
18
extern
int
STATE_COUNT
;
19
23
void
update_entities
();
24
28
void
STATES_INIT
();
29
37
PhysicsComponent
*
create_physics_component
(
Entity
* ent,
CollisionType
collision_type,
PhysicsType
physics_type);
38
39
45
AnimationComponent
*
create_animation_component
(
Entity
* ent);
46
55
Entity
*
create_entity
(
AssetInstance
* asset_instance,
int
mn_id,
bool
physics_component,
bool
animation_component);
56
61
void
destroy_entity
(
Entity
* ent);
62
63
#endif
engine_types.h
Engine specific types and defines.
MAX_ENTITY_STATES
#define MAX_ENTITY_STATES
Maximim Entity states for behaviors.
Definition
engine_types.h:124
AnimationComponent
The animation component for interpolation between AnimationKeyframes.
Definition
engine_types.h:2267
AssetInstance
A instance of an Asset that retains its node structure but can be duplicated into multiple instances ...
Definition
engine_types.h:2842
Entity
Entity structure that holds components and references to the data it owns.
Definition
engine_types.h:2333
State
Entity States that control what functions are available for an Entity.
Definition
engine_types.h:2318
STATE_COUNT
int STATE_COUNT
The amount of states inside of STATE_REGISTRY.
Definition
entity.c:15
update_entities
void update_entities()
TODO: Entity update loop.
Definition
entity.c:69
destroy_entity
void destroy_entity(Entity *ent)
Deletes an entity by simply freeing it and its components.
Definition
entity.c:224
create_animation_component
AnimationComponent * create_animation_component(Entity *ent)
Creates an animation component for an entity.
Definition
entity.c:121
STATE_REGISTRY
State STATE_REGISTRY[MAX_ENTITY_STATES]
Registry for entity states used for entity events and behaviors.
Definition
entity.c:14
create_physics_component
PhysicsComponent * create_physics_component(Entity *ent, CollisionType collision_type, PhysicsType physics_type)
Creates an physics component for an entity.
Definition
entity.c:88
STATES_INIT
void STATES_INIT()
Initializes entity states, which are a registry of function pointers used for entity events and behav...
Definition
entity.c:23
create_entity
Entity * create_entity(AssetInstance *asset_instance, int mn_id, bool physics_component, bool animation_component)
Creates an entity using the free list of ENTITIES.
Definition
entity.c:153
CollisionType
CollisionType
Defines collision types with different behaviors and mesh setup and validation.
Definition
engine_types.h:2058
PhysicsType
PhysicsType
Defines physics types with different behaviors in impulse resolution.
Definition
engine_types.h:2074
PhysicsComponent
Entity Component used for physics resolution.
Definition
engine_types.h:2151
src
ECS
entity.h
Generated by
1.18.0