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 | WriteInputCondition (const FInputCondition &InputCondition) |
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 75 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequence | ( | ) | const |
Checks the input sequence against the buffer with the Normal method.
Definition at line 111 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequenceNegative | ( | ) | const |
Checks the input sequence against the buffer with the Negative method.
Definition at line 467 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequenceNegativeStrict | ( | ) | const |
Checks the input sequence against the buffer with the Negative Strict method.
Definition at line 503 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequenceOnce | ( | ) | const |
Checks the input sequence against the buffer with the Once method.
Definition at line 222 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequenceOnceStrict | ( | ) | const |
Checks the input sequence against the buffer with the Once Strict method.
Definition at line 270 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequencePressAndRelease | ( | ) | const |
Checks the input sequence against the buffer with the Once method.
Definition at line 335 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequencePressAndReleaseStrict | ( | ) | const |
Checks the input sequence against the buffer with the Once Strict method.
Definition at line 392 of file InputBuffer.cpp.
bool FInputBuffer::CheckInputSequenceStrict | ( | ) | const |
Checks the input sequence against the buffer with the Strict method.
Definition at line 158 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 67 of file InputBuffer.cpp.
void FInputBuffer::FlipInputsInBuffer | ( | ) |
Flips the directional inputs in the buffer. For use after a character switches sides.
Definition at line 551 of file InputBuffer.cpp.
void FInputBuffer::Update | ( | int32 | Input | ) |
Stores the input for this frame.
Input | The input bitmask to store. |
Definition at line 56 of file InputBuffer.cpp.
void FInputBuffer::WriteInputCondition | ( | const FInputCondition & | InputCondition | ) |
Writes an input condition to the buffer. For use with CPU.
InputCondition | The input condition to write. |
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 37 of file InputBuffer.h.
|
protected |
How much time is allowed between inputs. Updated by the input being checked.
Definition at line 30 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 44 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 51 of file InputBuffer.h.
|
protected |
The input sequence. Updated by the input being checked.
Definition at line 26 of file InputBuffer.h.