32 lines
1.0 KiB
C++
32 lines
1.0 KiB
C++
#pragma once
|
|
#include "KPlayer.h"
|
|
#include "KPlayerController.h"
|
|
|
|
namespace KapitanGame {
|
|
;
|
|
enum class InputState : int {
|
|
Pressed,
|
|
Released,
|
|
Hold
|
|
};
|
|
struct KActionBind {
|
|
KActionBind(std::string name, const InputState expectedInputState, const std::shared_ptr<KPlayerController>& controllerObject, const KPlayerCommand command, const KPlayer player) :
|
|
Name(std::move(name)), ExpectedInputState(expectedInputState), ControllerObject(controllerObject), Command(command), Player(player) {}
|
|
std::string Name;
|
|
InputState ExpectedInputState;
|
|
std::weak_ptr<KPlayerController> ControllerObject;
|
|
KPlayerCommand Command;
|
|
KPlayer Player;
|
|
};
|
|
struct KAxisBind
|
|
{
|
|
KAxisBind(std::string name, const std::shared_ptr<KPlayerController>& controllerObject, const KPlayerAxisCommand command, const KPlayer player) :
|
|
Name(std::move(name)), ControllerObject(controllerObject), AxisCommand(command), Player(player) {}
|
|
std::string Name;
|
|
std::weak_ptr<KPlayerController> ControllerObject;
|
|
KPlayerAxisCommand AxisCommand;
|
|
KPlayer Player;
|
|
};
|
|
}
|
|
|