generated from Persson-dev/Godot-Xmake
brodacast shoot
This commit is contained in:
@@ -25,13 +25,15 @@ class World : public godot::Node3D, public protocol::PacketHandler {
|
||||
|
||||
void HandlePacket(const protocol::packets::PlayerJoin&) override;
|
||||
void HandlePacket(const protocol::packets::PlayerLeave&) override;
|
||||
void HandlePacket(const protocol::packets::PlayerShoot&) override;
|
||||
|
||||
protected:
|
||||
NetworkInterface* m_NetworkInterface;
|
||||
godot::Node* m_Players;
|
||||
float m_PassedTime;
|
||||
|
||||
|
||||
virtual void AddProjectile(
|
||||
PlayerID a_Shooter, const godot::Vector3& a_Position, const godot::Vector3& a_Rotation, const godot::Vector3& a_Velocity);
|
||||
virtual void AddPlayer(PlayerID a_PlayerId, godot::String a_PlayerName);
|
||||
virtual void RemovePlayer(PlayerID a_PlayerId);
|
||||
virtual void SetPlayerPositionAndRotation(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <blitz/common/Types.h>
|
||||
#include <vector>
|
||||
#include <godot_cpp/variant/string.hpp>
|
||||
#include <godot_cpp/variant/vector3.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace blitz {
|
||||
namespace protocol {
|
||||
@@ -66,7 +66,12 @@ struct PlayerPositionAndRotation {
|
||||
godot::Vector3 m_Velocity;
|
||||
};
|
||||
|
||||
struct PlayerShoot {};
|
||||
struct PlayerShoot {
|
||||
PlayerID m_Sender;
|
||||
godot::Vector3 m_Position;
|
||||
godot::Vector3 m_Rotation;
|
||||
godot::Vector3 m_Velocity;
|
||||
};
|
||||
|
||||
} // namespace data
|
||||
} // namespace protocol
|
||||
|
||||
Reference in New Issue
Block a user