feat: added projectile interface

This commit is contained in:
Sara 2024-03-19 13:23:02 +01:00
parent a93199d8b8
commit 96d557a0f7
2 changed files with 22 additions and 0 deletions

4
src/projectile.cpp Normal file
View file

@ -0,0 +1,4 @@
#include "projectile.hpp"
#include <godot_cpp/classes/node3d.hpp>
namespace godot {}

18
src/projectile.hpp Normal file
View file

@ -0,0 +1,18 @@
#ifndef PROJECTILE_HPP
#define PROJECTILE_HPP
#include "weapon_data.hpp"
namespace godot {
class Node3D;
class ProjectilePool;
class IProjectile {
public:
virtual void set_weapon_data(Ref<WeaponData> data) = 0;
void return_to_pool();
private:
ProjectilePool *pool{nullptr};
};
}
#endif // !PROJECTILE_HPP