Yume Project 3.0
Touhou-inspired Danmaku game made in C only
Chargement...
Recherche...
Aucune correspondance
enemy.h
Aller à la documentation de ce fichier.
1
11
12#pragma once
13
14#include "ecs/component.h"
15#include "content/assets.h"
16#include "systems/score.h"
17
18typedef struct Pool Pool;
19
26typedef struct {
27 unsigned int score;
28} Enemy;
29
31
32
48extern Entity Enemy_spawn(Pool *p, float x, float y, float speed, float angle,
49 int life, float hitboxRadius,
50 int score, SpriteID graphic);
51
62extern void Enemy_update_all(Pool *p, ScoreSystem *scoreS);
63
64
76Entity Enemy_spawn_score_decrease(Pool *p, float x, float y, float speed, float angle, float hitboxRadius, int score, SpriteID graphic);
Chargement et références des assets (textures, sprites, audio, polices).
SpriteID
Definition assets.h:63
Macros nécessaire à la création de nouvelles composantes de l'ECS.
#define DEFINE_COMPONENT_MANAGER(Type, Number)
Créé un composant dans l'ECS.
Definition component.h:62
#define MAX_ENTITIES
Definition ecs.h:14
uint32_t Entity
Une entité est un indice.
Definition ecs.h:20
Entity Enemy_spawn_score_decrease(Pool *p, float x, float y, float speed, float angle, float hitboxRadius, int score, SpriteID graphic)
spawn un enemy qui a le flag qui fait perdre des points si il est tué
Entity Enemy_spawn(Pool *p, float x, float y, float speed, float angle, int life, float hitboxRadius, int score, SpriteID graphic)
Crée un ennemi dans la pool.
void Enemy_update_all(Pool *p, ScoreSystem *scoreS)
Met à jour tous les ennemis.
composante ennemi dans l'ECS
Definition enemy.h:26
unsigned int score
Definition enemy.h:27
La pool est la structure qui contient l'Entity Component System Elle gêre les différentes composantes...
Definition pool.h:42
Definition score.h:4