generated from Persson-dev/Godot-Xmake
Collision of zombie body parts completed and different damage added depending on the body part hit
This commit is contained in:
30
src/BoneCollisionShape.h
Normal file
30
src/BoneCollisionShape.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <godot_cpp/classes/area3d.hpp>
|
||||
|
||||
namespace blitz {
|
||||
class BoneCollisionShape : public godot::Area3D {
|
||||
|
||||
GDCLASS(BoneCollisionShape, godot::Area3D)
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
BoneCollisionShape();
|
||||
~BoneCollisionShape();
|
||||
|
||||
void _ready();
|
||||
void headshot_hit();
|
||||
void bodyshot_hit();
|
||||
|
||||
private:
|
||||
int m_HeadDamage = 2;
|
||||
int m_BodyDamage = 1;
|
||||
void set_head_damage(int d);
|
||||
int get_head_damage() const;
|
||||
void set_body_damage(int d);
|
||||
int get_body_damage() const;
|
||||
};
|
||||
|
||||
} // namespace blitz
|
||||
Reference in New Issue
Block a user