32 lines
521 B
C
32 lines
521 B
C
#pragma once
|
|
|
|
#include "../../ecs_entity.h"
|
|
|
|
typedef struct ComponentPower
|
|
{
|
|
Component component;
|
|
f32 value;
|
|
f32 max;
|
|
f32 gain;
|
|
} ComponentPower;
|
|
|
|
void component_power_tick(ComponentPower* self, ECS* ecs);
|
|
void component_power_init(ComponentPower* self, ECS* ecs, f32 max, f32 gain);
|
|
|
|
static const ComponentInfo COMPONENT_POWER_INFO =
|
|
{
|
|
.system =
|
|
{
|
|
.functions =
|
|
{
|
|
NULL,
|
|
NULL,
|
|
(ECSFunction)component_power_tick,
|
|
NULL,
|
|
NULL
|
|
}
|
|
},
|
|
.type = COMPONENT_POWER,
|
|
.size = sizeof(ComponentPower)
|
|
};
|