Yume Project 3.0
Touhou-inspired Danmaku game made in C only
Chargement...
Recherche...
Aucune correspondance
Référence du fichier bullet.h

Fonctions qui permettent de tirer des bullets de différentes manières. Plus de détails...

#include "component.h"
#include "content/assets.h"
#include "ecs/ecs.h"
#include "common.h"
#include "flags.h"

Aller au code source de ce fichier.

Classes

struct  Condensation
 composante condensation dans l'ECS Plus de détails...

Définitions de type

typedef struct GameContext GameContext
typedef struct Condensation Condensation
 composante condensation dans l'ECS

Fonctions

Entity Bullet_enemy_spawn (Pool *p, float x, float y, float speed, float angle, SpriteID graphic)
 Spawn un bullet avec une position, un angle et une vitesse initiale.
Entity Bullet_enemy_spawn_delayed (Pool *p, float x, float y, float speed, float angle, SpriteID graphic, int delay)
 Spawn bullet après un certain delay. Durant ce delay, le sprite est affiché en agrandissant le sprite de base.
Entity Bullet_enemy_spawn_radius (Pool *p, float x, float y, float speed, float angle, float radius, SpriteID graphic)
 Spawn une bullet à un rayon autour d'un point.
Entity Bullet_enemy_spawn_radius_delayed (Pool *p, float x, float y, float speed, float angle, float radius, SpriteID graphic, int delay)
Entity Bullet_spawn_accelerate (Pool *p, float x, float y, float speed, float angle, SpriteID graphic, float accel, int accel_delay)
Entity Bullet_spawn_radius_accelerate (Pool *p, float x, float y, float speed, float angle, float radius, SpriteID graphice, float accel, int accel_delay)
Entity Bullet_player_spawn (Pool *p, float x, float y, float speed, float angle, SpriteID graphic)
 Spawn un bullet avec une position, un angle et une vitesse initiale.
Entity Bullet_spawn (Pool *p, float x, float y, float speed, float angle, EntityType tag, SpriteID graphic)
 Spawn un bullet avec une position, un angle et une vitesse initiale.
void Condensation_update_all (Pool *p)
 Affiche la condensation de toutes les entitées, ou la supprime si elle a expiré
void Bullet_kill (GameContext *ctx, Entity bullet)
 Détruit une bullet -> effet visuels.
void Bullet_clear_bullets (GameContext *ctx)
 Détruit toutes les bullets.

Description détaillée

Fonctions qui permettent de tirer des bullets de différentes manières.

Une bullet est une entité ECS ayant les composantes:

Documentation des définitions de type

◆ Condensation

typedef struct Condensation Condensation

composante condensation dans l'ECS

Avant l'apparition d'une balle, une courte animation appellée condensation préviens le joueur visuellement du danger

◆ GameContext

typedef struct GameContext GameContext

Documentation des fonctions

◆ Bullet_clear_bullets()

void Bullet_clear_bullets ( GameContext * ctx)

Détruit toutes les bullets.

Paramètres
ppool courante (toutes les données de l'ECS)

◆ Bullet_enemy_spawn()

Entity Bullet_enemy_spawn ( Pool * p,
float x,
float y,
float speed,
float angle,
SpriteID graphic )

Spawn un bullet avec une position, un angle et une vitesse initiale.

La bullet dispose du tag ENT_ENEMY_SHOT et du flag FLAG_PROJECTILE_ENEMY

Paramètres
ppool courante (toutes les données de l'ECS)
xCoord x initiale
yCoord y initiale
speedVitesse initiale
angleAngle init (en degré)
textureId de la texture a utiliser

◆ Bullet_enemy_spawn_delayed()

Entity Bullet_enemy_spawn_delayed ( Pool * p,
float x,
float y,
float speed,
float angle,
SpriteID graphic,
int delay )

Spawn bullet après un certain delay. Durant ce delay, le sprite est affiché en agrandissant le sprite de base.

Spawn un bullet avec une position, un angle et une vitesse initiale. La bullet réalise une animation de condensation d'une durée spécifiée.

Paramètres
p
x
y
speed
angle
graphic
delay
Renvoie
Entity
Paramètres
ppool courante (toutes les données de l'ECS)
xCoord x initiale
yCoord y initiale
speed
angle
graphic
delay
Renvoie
Entity

◆ Bullet_enemy_spawn_radius()

Entity Bullet_enemy_spawn_radius ( Pool * p,
float x,
float y,
float speed,
float angle,
float radius,
SpriteID graphic )

Spawn une bullet à un rayon autour d'un point.

Paramètres
p
x
y
speed
angle
radius
graphic
Renvoie
Entity

◆ Bullet_enemy_spawn_radius_delayed()

Entity Bullet_enemy_spawn_radius_delayed ( Pool * p,
float x,
float y,
float speed,
float angle,
float radius,
SpriteID graphic,
int delay )

◆ Bullet_kill()

void Bullet_kill ( GameContext * ctx,
Entity bullet )

Détruit une bullet -> effet visuels.

◆ Bullet_player_spawn()

Entity Bullet_player_spawn ( Pool * p,
float x,
float y,
float speed,
float angle,
SpriteID graphic )

Spawn un bullet avec une position, un angle et une vitesse initiale.

La bullet dispose du tag ENT_PLAYER_SHOT et des flag FLAG_BULLET_PLAYER et FLAG_PROJECTILE_PLAYER

Paramètres
ppool courante (toutes les données de l'ECS)
xCoord x initiale
yCoord y initiale
speedVitesse initiale
angleAngle init (en degré)
textureId de la texture a utiliser

◆ Bullet_spawn()

Entity Bullet_spawn ( Pool * p,
float x,
float y,
float speed,
float angle,
EntityType tag,
SpriteID graphic )

Spawn un bullet avec une position, un angle et une vitesse initiale.

Paramètres
ppool courante (toutes les données de l'ECS)
xCoord x initiale
yCoord y initiale
speedVitesse initiale
angleAngle init (en degré)
textureId de la texture a utiliser

◆ Bullet_spawn_accelerate()

Entity Bullet_spawn_accelerate ( Pool * p,
float x,
float y,
float speed,
float angle,
SpriteID graphic,
float accel,
int accel_delay )

◆ Bullet_spawn_radius_accelerate()

Entity Bullet_spawn_radius_accelerate ( Pool * p,
float x,
float y,
float speed,
float angle,
float radius,
SpriteID graphice,
float accel,
int accel_delay )

◆ Condensation_update_all()

void Condensation_update_all ( Pool * p)

Affiche la condensation de toutes les entitées, ou la supprime si elle a expiré

Paramètres
ppool courante (toutes les données de l'ECS)