mirror of
https://github.com/NoelFB/blah.git
synced 2025-02-19 13:28:29 +08:00
additional input binding comments
This commit is contained in:
parent
f3bbda5f6c
commit
3913cf7c02
@ -7,6 +7,9 @@
|
|||||||
namespace Blah
|
namespace Blah
|
||||||
{
|
{
|
||||||
// Single input Binding
|
// Single input Binding
|
||||||
|
// You must call Binding::update() every frame to poll the input state.
|
||||||
|
// Alternatively, bindings can be registered to BindingRegistry which will
|
||||||
|
// automatically update them.
|
||||||
class Binding
|
class Binding
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -158,7 +161,10 @@ namespace Blah
|
|||||||
float get_value() const;
|
float get_value() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Represents a Bound Axis (ex. Left/Right movement, or a Trigger)
|
// Axis Binding (ex. Left/Right movement, or a Trigger)
|
||||||
|
// You must call AxisBinding::update() every frame to poll the input state.
|
||||||
|
// Alternatively, bindings can be registered to BindingRegistry which will
|
||||||
|
// automatically update them.
|
||||||
class AxisBinding
|
class AxisBinding
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -224,6 +230,10 @@ namespace Blah
|
|||||||
void clear();
|
void clear();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Stick Binding (ex. Joystick, Dpad, Arrow Keys, WASD, etc)
|
||||||
|
// You must call StickBinding::update() every frame to poll the input state.
|
||||||
|
// Alternatively, bindings can be registered to BindingRegistry which will
|
||||||
|
// automatically update them.
|
||||||
class StickBinding
|
class StickBinding
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -9,10 +9,8 @@ namespace Blah
|
|||||||
using AxisBindingRef = std::shared_ptr<AxisBinding>;
|
using AxisBindingRef = std::shared_ptr<AxisBinding>;
|
||||||
using StickBindingRef = std::shared_ptr<StickBinding>;
|
using StickBindingRef = std::shared_ptr<StickBinding>;
|
||||||
|
|
||||||
// Optional registry to automatically update bindings.
|
// An Optional registry to automatically update Input Bindings.
|
||||||
// You can register different types of bindings here and until they are
|
// Once registered here, you do not need to explicitely call their update methods.
|
||||||
// no longer used, they will be updated without having to explicitely call
|
|
||||||
// their update methods
|
|
||||||
class BindingRegistry
|
class BindingRegistry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user