adding particule component and adding it to the player (one big particule)

This commit is contained in:
Clément Le Bihan
2020-05-03 01:02:40 +02:00
parent c3d888d714
commit 0a8b15f5f7
8 changed files with 229 additions and 2 deletions
+35
View File
@@ -0,0 +1,35 @@
/*
** EPITECH PROJECT, 2020
** my_rpg
** File description:
** particule_component.c
*/
#ifndef MY_RPG_PARTICULE_COMPONENT_H
#define MY_RPG_PARTICULE_COMPONENT_H
#include <stdbool.h>
#include "sprite.h"
#include "component.h"
struct particule
{
unsigned int lifetime;
gc_sprite *sprite;
};
struct particule_component
{
gc_component base;
int type;
unsigned int lifetime;
int nb_max_particules;
void *texture;
struct particule *particules;
};
extern const struct particule_component particule_component;
#endif //MY_RPG_PARTICULE_COMPONENT_H
+1 -1
View File
@@ -16,6 +16,6 @@ struct game_manager_system {
bool has_message;
};
const struct game_manager_system game_manager_system;
extern const struct game_manager_system game_manager_system;
#endif //_MAP_MOVEMENT_SYSTEM_H__
+18
View File
@@ -0,0 +1,18 @@
/*
** EPITECH PROJECT, 2019
** MUL_my_runner_2019
** File description:
** particule_system
*/
#ifndef MY_RPG_PARTICULE_SYSTEM_H
#define MY_RPG_PARTICULE_SYSTEM_H
#include "engine.h"
void particule_update_entity(gc_engine *engine, void *system, \
gc_entity *entity, float dt);
extern const struct gc_system particule_system;
#endif //MY_RPG_PARTICULE_SYSTEM_H