34 lines
995 B
C++
34 lines
995 B
C++
#ifndef GDCONTROLLER_H
|
|
#define GDCONTROLLER_H
|
|
|
|
#include <godot_cpp/classes/multiplayer_synchronizer.hpp>
|
|
// YOU MAY GET MYSTERIOUS "INVALID USE OF INCOMPLETE TYPE" ERRORS IF YOU DO NOT INCLUDE THE THINGS YOU NEED, BECAUSE THEY MIGHT BE BRIEFLY DEFINED IN OTHER THINGS.
|
|
#include <godot_cpp/classes/scene_replication_config.hpp>
|
|
#include <godot_cpp/classes/multiplayer_api.hpp>
|
|
#include <godot_cpp/classes/input_event.hpp>
|
|
#include <godot_cpp/classes/canvas_item.hpp>
|
|
|
|
namespace godot
|
|
{
|
|
class Controller : public MultiplayerSynchronizer
|
|
{
|
|
GDCLASS(Controller,MultiplayerSynchronizer)
|
|
protected:
|
|
static void _bind_methods();
|
|
public:
|
|
int flags;
|
|
Vector2 target;
|
|
CanvasItem *parent;
|
|
Controller();
|
|
~Controller();
|
|
void _process(double delta) override;
|
|
void _enter_tree() override;
|
|
void _unhandled_key_input(const Ref<InputEvent> &p_event);
|
|
// Garbage
|
|
void set_flags(const int p_flags);
|
|
int get_flags() const;
|
|
void set_target(const Vector2 p_target);
|
|
Vector2 get_target() const;
|
|
};
|
|
}
|
|
#endif |