23 lines
469 B
C++
23 lines
469 B
C++
#include "projectile.hpp"
|
|
#include "projectile_pool.hpp"
|
|
#include <godot_cpp/classes/node3d.hpp>
|
|
|
|
namespace godot {
|
|
void Projectile::_bind_methods() {
|
|
#define CLASSNAME Projectile
|
|
}
|
|
void Projectile::return_to_pool() {
|
|
if(!this->pool)
|
|
return;
|
|
this->pool->return_projectile(this);
|
|
}
|
|
|
|
void Projectile::set_weapon_data(Ref<WeaponData> data) {
|
|
this->data = data;
|
|
}
|
|
|
|
void Projectile::set_projectile_pool(ProjectilePool *pool) {
|
|
this->pool = pool;
|
|
}
|
|
}
|