24 lines
537 B
C
24 lines
537 B
C
#ifndef LEVER_COMPONENT_H
|
|
#define LEVER_COMPONENT_H
|
|
|
|
#include "ecs.h"
|
|
#include "vector2d.h"
|
|
|
|
#define LEVER_DEFAULT_ANIMATION_SPEED 100
|
|
|
|
typedef struct lever_component_data_t {
|
|
component_t *animation_system;
|
|
|
|
bool state;
|
|
bool last_state;
|
|
|
|
size_t topic_id;
|
|
} lever_component_data_t;
|
|
|
|
int lever_component_init(component_t *component);
|
|
int lever_component_update(component_t *component);
|
|
int lever_component_destroy(component_t *component);
|
|
|
|
int lever_component_subscribe(component_t *component);
|
|
|
|
#endif // LEVER_COMPONENT_H
|