2dkg/2dkg_zad5/2dgk_zad5/KActionBind.h

32 lines
1.0 KiB
C
Raw Normal View History

2022-01-20 08:52:14 +01:00
#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;
};
}