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>

Collaboration diagram for FInputBuffer:

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
 

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 25 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 61 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 417 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 453 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 172 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 220 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 285 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 342 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 108 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 17 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 501 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 6 of file InputBuffer.cpp.

Member Data Documentation

◆ bInputAllowDisable

bool FInputBuffer::bInputAllowDisable = true
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.

◆ ImpreciseInputCount

int32 FInputBuffer::ImpreciseInputCount = 0
protected

How much time is allowed between inputs. Updated by the input being checked.

Definition at line 29 of file InputBuffer.h.

◆ 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 43 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 50 of file InputBuffer.h.

◆ InputSequence

FInputBitmask FInputBuffer::InputSequence[InputSequenceSize] = { }
protected

The input sequence. Updated by the input being checked.

Definition at line 25 of file InputBuffer.h.


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