refactor: header file for every module
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#ifndef PROJECTILES_H
|
||||
#define PROJECTILES_H
|
||||
|
||||
#include <raylib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "enginePhysics.h"
|
||||
#include "player.h"
|
||||
|
||||
#define MAX_PROJECTILES 100
|
||||
#define PROJECTILE_SPEED 50.0f
|
||||
|
||||
typedef struct {
|
||||
int count;
|
||||
Physics physics[MAX_PROJECTILES];
|
||||
bool active[MAX_PROJECTILES];
|
||||
bool friendly[MAX_PROJECTILES];
|
||||
float radius[MAX_PROJECTILES];
|
||||
Color color[MAX_PROJECTILES];
|
||||
Sound soundShooting[MAX_PROJECTILES];
|
||||
Sound soundImpact[MAX_PROJECTILES];
|
||||
} Projectiles;
|
||||
|
||||
Projectiles CreateProjectiles(void);
|
||||
bool FireProjectile(Projectiles *projectiles, Vector2 position, Vector2 direction, bool friendly);
|
||||
void UpdateProjectiles(Projectiles *projectiles, Player *player);
|
||||
void RenderProjectiles(Projectiles *projectiles);
|
||||
void ResetProjectiles(Projectiles *projectiles);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user