#include "gameCommon.h" #include "entity.h" #ifndef BULLET_H #define BULLET_H // Just a simple, deadly, bullet. typedef struct Bullet { bool hit; Ray ray; EntityId fromId; EntityFingerprint fromFingerprint; // Shooter gets shot before bullet hits object hehe. float damage; } Bullet; // All the simple, deadly, bullets. typedef struct Bullets { Bullet * bullets; size_t bulletsCount; } Bullets; // Create the simple, deadly, bullet. offset is the bullet offset from the entity. Bullet createBullet(Entity entity, Vector3 direction, Vector3 offset, float damage); void initBullets(Bullets * bullets); void freeBullets(Bullets * bullets); KfError addBullet(Bullets * bullets, Bullet bullet); KfError popBackBullets(Bullets * bullets); void updateBullets(Game * game, Bullets * bullets); void updateBullet(Game * game, Bullet * bullet); #endif