feat: player body now handles movement fov adjustment
This commit is contained in:
parent
b29966ccf7
commit
6c5a24e374
7 changed files with 62 additions and 43 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "scene/3d/physics/character_body_3d.h"
|
||||
class WeaponInventory;
|
||||
class HealthStatus;
|
||||
class PlayerCamera;
|
||||
|
||||
class PlayerBody : public CharacterBody3D {
|
||||
GDCLASS(PlayerBody, CharacterBody3D);
|
||||
|
|
@ -11,6 +12,7 @@ class PlayerBody : public CharacterBody3D {
|
|||
static PlayerBody *singleton_instance;
|
||||
|
||||
void on_child_entered(Node *node);
|
||||
void process(double delta);
|
||||
void physics_process(double delta);
|
||||
|
||||
void set_movement_input(Vector2 state);
|
||||
|
|
@ -36,7 +38,8 @@ private:
|
|||
float jump_strength{ 4.f };
|
||||
Vector2 movement_input{ 0, 0 };
|
||||
|
||||
WeaponInventory *weapons;
|
||||
PlayerCamera *camera{ nullptr };
|
||||
WeaponInventory *weapons{ nullptr };
|
||||
HealthStatus *health{ nullptr };
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue