Night Sky Engine
A fighting game framework made in Unreal Engine
Loading...
Searching...
No Matches
FInputBuffer Struct Reference

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 }
 

Detailed Description

The input buffer for a player object.

Stores inputs every frame, and handles input checking.

Definition at line 18 of file InputBuffer.h.

Member Function Documentation

◆ CheckInputCondition()

bool FInputBuffer::CheckInputCondition ( const FInputCondition & InputCondition,
bool bIsKara = false )

Checks an input condition against the buffer.

Parameters
InputConditionThe input condition to check.
Returns
If the input condition matches the buffer, return true. Otherwise return false.

Definition at line 75 of file InputBuffer.cpp.

◆ CheckInputSequence()

bool FInputBuffer::CheckInputSequence ( ) const

Checks the input sequence against the buffer with the Normal method.

See also
EInputMethod
Returns
If the input sequence matches the buffer, return true. Otherwise return false.

Definition at line 112 of file InputBuffer.cpp.

◆ CheckInputSequenceNegative()

bool FInputBuffer::CheckInputSequenceNegative ( ) const

Checks the input sequence against the buffer with the Negative method.

See also
EInputMethod
Returns
If the input sequence matches the buffer, return true. Otherwise return false.

Definition at line 498 of file InputBuffer.cpp.

◆ CheckInputSequenceNegativeStrict()

bool FInputBuffer::CheckInputSequenceNegativeStrict ( ) const

Checks the input sequence against the buffer with the Negative Strict method.

See also
EInputMethod
Returns
If the input sequence matches the buffer, return true. Otherwise return false.

Definition at line 539 of file InputBuffer.cpp.

◆ CheckInputSequenceOnce()

bool FInputBuffer::CheckInputSequenceOnce ( ) const

Checks the input sequence against the buffer with the Once method.

See also
EInputMethod
Returns
If the input sequence matches the buffer, return true. Otherwise return false.

Definition at line 233 of file InputBuffer.cpp.

◆ CheckInputSequenceOnceStrict()

bool FInputBuffer::CheckInputSequenceOnceStrict ( ) const

Checks the input sequence against the buffer with the Once Strict method.

See also
EInputMethod
Returns
If the input sequence matches the buffer, return true. Otherwise return false.

Definition at line 286 of file InputBuffer.cpp.

◆ CheckInputSequencePressAndRelease()

bool FInputBuffer::CheckInputSequencePressAndRelease ( ) const

Checks the input sequence against the buffer with the Once method.

See also
EInputMethod
Returns
If the input sequence matches the buffer, return true. Otherwise return false.

Definition at line 356 of file InputBuffer.cpp.

◆ CheckInputSequencePressAndReleaseStrict()

bool FInputBuffer::CheckInputSequencePressAndReleaseStrict ( ) const

Checks the input sequence against the buffer with the Once Strict method.

See also
EInputMethod
Returns
If the input sequence matches the buffer, return true. Otherwise return false.

Definition at line 418 of file InputBuffer.cpp.

◆ CheckInputSequenceStrict()

bool FInputBuffer::CheckInputSequenceStrict ( ) const

Checks the input sequence against the buffer with the Strict method.

See also
EInputMethod
Returns
If the input sequence matches the buffer, return true. Otherwise return false.

Definition at line 164 of file InputBuffer.cpp.

◆ Emplace()

void FInputBuffer::Emplace ( int32 Input,
uint32 Index )

Stores the input at an arbitrary buffer position. Intended for CPU usage.

Parameters
InputThe input bitmask to store.
IndexThe index of the buffer to store at.

Definition at line 67 of file InputBuffer.cpp.

◆ FlipInputsInBuffer()

void FInputBuffer::FlipInputsInBuffer ( )

Flips the directional inputs in the buffer. For use after a character switches sides.

Definition at line 592 of file InputBuffer.cpp.

◆ Update()

void FInputBuffer::Update ( int32 Input)

Stores the input for this frame.

Parameters
InputThe input bitmask to store.

Definition at line 56 of file InputBuffer.cpp.

◆ WriteInputCondition()

void FInputBuffer::WriteInputCondition ( const FInputCondition & InputCondition)

Writes an input condition to the buffer. For use with CPU.

Parameters
InputConditionThe input condition to write.

Definition at line 6 of file InputBuffer.cpp.

Member Data Documentation

◆ InputBufferInternal

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 49 of file InputBuffer.h.

◆ InputDisabled

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 56 of file InputBuffer.h.


The documentation for this struct was generated from the following files: