generated from Persson-dev/Godot-Xmake
LaserGun without collisions
This commit is contained in:
22
src/Bullet.cpp
Normal file
22
src/Bullet.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "Bullet.h"
|
||||
|
||||
using namespace godot;
|
||||
|
||||
namespace blitz {
|
||||
|
||||
static constexpr float BULLET_SPEED = 40.0f;
|
||||
|
||||
void Bullet::_bind_methods() {}
|
||||
|
||||
Bullet::Bullet() {}
|
||||
|
||||
Bullet::~Bullet() {}
|
||||
|
||||
void Bullet::_ready() {}
|
||||
|
||||
void Bullet::_physics_process(float a_Delta) {
|
||||
Vector3 movement = Vector3(0, 0, -BULLET_SPEED) * a_Delta;
|
||||
set_position(get_transform().xform(movement));
|
||||
}
|
||||
|
||||
} // namespace blitz
|
||||
Reference in New Issue
Block a user