mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-25 16:18:57 +08:00
additional input binding comments
This commit is contained in:
parent
f3bbda5f6c
commit
3913cf7c02
|
@ -7,6 +7,9 @@
|
|||
namespace Blah
|
||||
{
|
||||
// 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
|
||||
{
|
||||
public:
|
||||
|
@ -158,7 +161,10 @@ namespace Blah
|
|||
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
|
||||
{
|
||||
public:
|
||||
|
@ -224,6 +230,10 @@ namespace Blah
|
|||
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
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -9,10 +9,8 @@ namespace Blah
|
|||
using AxisBindingRef = std::shared_ptr<AxisBinding>;
|
||||
using StickBindingRef = std::shared_ptr<StickBinding>;
|
||||
|
||||
// Optional registry to automatically update bindings.
|
||||
// You can register different types of bindings here and until they are
|
||||
// no longer used, they will be updated without having to explicitely call
|
||||
// their update methods
|
||||
// An Optional registry to automatically update Input Bindings.
|
||||
// Once registered here, you do not need to explicitely call their update methods.
|
||||
class BindingRegistry
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue
Block a user