Night Sky Engine
A fighting game framework made in Unreal Engine
|
The input buffer for a player object. More...
#include <InputBuffer.h>
Public Member Functions | |
void | Update (int32 Input) |
Stores the input for this frame. | |
void | Emplace (int32 Input, uint32 Index) |
Stores the input at an arbitrary buffer position. Intended for CPU usage. | |
bool | CheckInputCondition (const FInputCondition &InputCondition, bool bIsKara=false) |
Checks an input condition against the buffer. | |
bool | CheckInputSequence () const |
bool | CheckInputSequenceStrict () const |
bool | CheckInputSequenceOnce () const |
bool | CheckInputSequenceOnceStrict () const |
bool | CheckInputSequencePressAndRelease () const |
bool | CheckInputSequencePressAndReleaseStrict () const |
bool | CheckInputSequenceNegative () const |
bool | CheckInputSequenceNegativeStrict () const |
void | FlipInputsInBuffer () |
Public Attributes | |
int32 | InputBufferInternal [InputBufferSize] = { 16 } |
int32 | InputDisabled [InputBufferSize] = { 0 } |
Protected Attributes | |
FInputBitmask | InputSequence [InputSequenceSize] = { } |
int32 | ImpreciseInputCount = 0 |
bool | bInputAllowDisable = true |
The input buffer for a player object.
Stores inputs every frame, and handles input checking.
Definition at line 18 of file InputBuffer.h.
bool FInputBuffer::CheckInputCondition | ( | const FInputCondition & | InputCondition, |
bool | bIsKara = false ) |
Checks an input condition against the buffer.
InputCondition | The input condition to check. |
Definition at line 25 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequence | ( | ) | const |
Checks the input sequence against the buffer with the Normal method.
Definition at line 61 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequenceNegative | ( | ) | const |
Checks the input sequence against the buffer with the Negative method.
Definition at line 417 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequenceNegativeStrict | ( | ) | const |
Checks the input sequence against the buffer with the Negative Strict method.
Definition at line 453 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequenceOnce | ( | ) | const |
Checks the input sequence against the buffer with the Once method.
Definition at line 172 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequenceOnceStrict | ( | ) | const |
Checks the input sequence against the buffer with the Once Strict method.
Definition at line 220 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequencePressAndRelease | ( | ) | const |
Checks the input sequence against the buffer with the Once method.
Definition at line 285 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequencePressAndReleaseStrict | ( | ) | const |
Checks the input sequence against the buffer with the Once Strict method.
Definition at line 342 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequenceStrict | ( | ) | const |
Checks the input sequence against the buffer with the Strict method.
Definition at line 108 of file InputBuffer.cpp.
void FInputBuffer::Emplace | ( | int32 | Input, |
uint32 | Index ) |
Stores the input at an arbitrary buffer position. Intended for CPU usage.
Input | The input bitmask to store. |
Index | The index of the buffer to store at. |
Definition at line 17 of file InputBuffer.cpp.
void FInputBuffer::FlipInputsInBuffer | ( | ) |
Flips the directional inputs in the buffer. For use after a character switches sides.
Definition at line 501 of file InputBuffer.cpp.
void FInputBuffer::Update | ( | int32 | Input | ) |
Stores the input for this frame.
Input | The input bitmask to store. |
Definition at line 6 of file InputBuffer.cpp.
|
protected |
This value determines if the input buffer will consider disabled inputs. If true, and an input matches a disabled input on the same frame, the buffer will reject the sequence. Otherwise, the input sequence will be read as normal. Updated by the input being checked.
Definition at line 36 of file InputBuffer.h.
|
protected |
How much time is allowed between inputs. Updated by the input being checked.
Definition at line 29 of file InputBuffer.h.
int32 FInputBuffer::InputBufferInternal[InputBufferSize] = { 16 } |
All stored inputs. Inputs are stored with the newest at the end and the oldest at the beginning.
Definition at line 43 of file InputBuffer.h.
int32 FInputBuffer::InputDisabled[InputBufferSize] = { 0 } |
All disabled inputs. Upon a successful state transition, the last input will be disabled. If an input being checked matches a disabled input on the same frame, the input check will fail.
Definition at line 50 of file InputBuffer.h.
|
protected |
The input sequence. Updated by the input being checked.
Definition at line 25 of file InputBuffer.h.