Untitled
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
18extern int STATE_COUNT;
19
23void update_entities();
24
28void STATES_INIT();
29
37PhysicsComponent * create_physics_component(Entity * ent, CollisionType collision_type, PhysicsType physics_type);
38
39
46
55Entity * create_entity(AssetInstance * asset_instance, int mn_id, bool physics_component, bool animation_component);
56
61void destroy_entity(Entity * ent);
62
63#endif
Engine specific types and defines.
#define MAX_ENTITY_STATES
Maximim Entity states for behaviors.
The animation component for interpolation between AnimationKeyframes.
A instance of an Asset that retains its node structure but can be duplicated into multiple instances ...
Entity structure that holds components and references to the data it owns.
Entity States that control what functions are available for an Entity.
int STATE_COUNT
The amount of states inside of STATE_REGISTRY.
Definition entity.c:15
void update_entities()
TODO: Entity update loop.
Definition entity.c:69
void destroy_entity(Entity *ent)
Deletes an entity by simply freeing it and its components.
Definition entity.c:224
AnimationComponent * create_animation_component(Entity *ent)
Creates an animation component for an entity.
Definition entity.c:121
State STATE_REGISTRY[MAX_ENTITY_STATES]
Registry for entity states used for entity events and behaviors.
Definition entity.c:14
PhysicsComponent * create_physics_component(Entity *ent, CollisionType collision_type, PhysicsType physics_type)
Creates an physics component for an entity.
Definition entity.c:88
void STATES_INIT()
Initializes entity states, which are a registry of function pointers used for entity events and behav...
Definition entity.c:23
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
Defines collision types with different behaviors and mesh setup and validation.
PhysicsType
Defines physics types with different behaviors in impulse resolution.
Entity Component used for physics resolution.