Untitled
Toggle main menu visibility
Loading...
Searching...
No Matches
entity_states.c
Go to the documentation of this file.
1
2
#include "
entity_states.h
"
3
4
#include "
utilities/engine_utilities.h
"
5
#include "
utilities/utilities.h
"
6
#include "
entity.h
"
7
8
void
ESTATE_chair_interact
(
void
* data)
9
{
10
11
Entity
* ent = (
Entity
*)data;
12
13
MeshNode
* mns =
CAST_VEC
(
GLOBALS
.
mesh_nodes
,
MeshNode
);
14
MeshNode
* mn = &mns[ent->
mesh_node
];
15
mn->
translation
.
z
+= 0.2;
16
mn->
global_matrix
=
compose_trs_from_mesh_node
(mn);
17
18
19
}
20
21
22
void
ESTATE_chair_combat
(
void
* data)
23
{
24
25
Entity
* ent = (
Entity
*)data;
26
27
28
}
29
30
Globals::mesh_nodes
Vector mesh_nodes
MeshNodes.
Definition
engine_types.h:3419
Entity::mesh_node
int mesh_node
The top-most MeshNode that belongs to this Entity.
Definition
engine_types.h:2338
GLOBALS
Globals GLOBALS
Engine Globals.
Definition
main.c:310
Entity
Entity structure that holds components and references to the data it owns.
Definition
engine_types.h:2333
engine_utilities.h
compose_trs_from_mesh_node
mat4 compose_trs_from_mesh_node(MeshNode *mn)
Definition
engine_utilities.h:18
entity.h
ECS creation and maintenance.
ESTATE_chair_combat
void ESTATE_chair_combat(void *data)
Definition
entity_states.c:22
ESTATE_chair_interact
void ESTATE_chair_interact(void *data)
Definition
entity_states.c:8
entity_states.h
ECS registry for behaviors.
MeshNode::translation
vec3 translation
Definition
engine_types.h:2379
MeshNode::global_matrix
mat4 global_matrix
Definition
audio_probe_bake.comp:101
MeshNode
MeshNodes that describe the position of Meshes, GLTF nodes for GLTFAnimations, or hold references to ...
Definition
audio_probe_bake.comp:85
vec3::z
float z
Definition
types.h:12
utilities.h
CAST_VEC
#define CAST_VEC(vec, type)
Definition
utilities.h:134
src
ECS
entity_states.c
Generated by
1.18.0