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

#include <NightSkyGameState.h>

Inheritance diagram for ANightSkyGameState:
Collaboration diagram for ANightSkyGameState:

Public Member Functions

 ANightSkyGameState ()
 
virtual void Tick (float DeltaTime) override
 
void MatchInit ()
 
void RoundInit ()
 
void UpdateGameState ()
 
void UpdateGameState (int32 Input1, int32 Input2, bool bShouldResimulate)
 
void SetStageBounds ()
 
void SetScreenBounds () const
 
void StartSuperFreeze (int32 Duration, int32 SelfDuration, ABattleObject *CallingObject)
 
void ScreenPosToWorldPos (int32 X, int32 Y, int32 *OutX, int32 *OutY) const
 
ABattleObjectAddBattleObject (const UState *InState, int PosX, int PosY, EObjDir Dir, int32 ObjectStateIndex, bool bIsCommonState, APlayerObject *Parent) const
 
void SetDrawPriorityFront (ABattleObject *InObject) const
 
APlayerObjectSwitchMainPlayer (APlayerObject *InPlayer, int TeamIndex)
 
APlayerObjectCallAssist (const bool IsP1, int AssistIndex, const FGameplayTag AssistName)
 
bool CanTag (const APlayerObject *InPlayer, int TeamIndex) const
 
void SaveGameState (int32 *InChecksum)
 
void LoadGameState ()
 
void UpdateCamera ()
 
void PlayLevelSequence (APlayerObject *Target, APlayerObject *Enemy, ULevelSequence *Sequence)
 
void CameraShake (const TSubclassOf< UCameraShakeBase > &Pattern, float Scale) const
 
void UpdateHUD () const
 
void BattleHudVisibility (bool Visible)
 
void PlayCommonAudio (USoundBase *InSoundWave, float MaxDuration)
 
void PlayCharaAudio (USoundBase *InSoundWave, float MaxDuration)
 
void PlayVoiceLine (USoundBase *InSoundWave, float MaxDuration, int Player)
 
void PlayAnnouncerVoice (USoundBase *InSoundWave, float MaxDuration)
 
void PlayMusic (const FGameplayTag Name)
 
void PlayMusic (USoundBase *InSoundWave, float MaxDuration)
 
void ManageAudio ()
 
void RollbackStartAudio (int32 InFrame) const
 
int GetLocalInputs (int Index) const
 
void UpdateRemoteInput (int RemoteInput[], int32 InFrame)
 
void SetOtherChecksum (uint32 RemoteChecksum, int32 InFrame)
 
TArray< APlayerObject * > GetTeam (bool IsP1) const
 
APlayerObjectGetMainPlayer (bool IsP1) const
 
void CallBattleExtension (FGameplayTag Name)
 
int32 GetGauge (bool IsP1, int32 GaugeIndex) const
 
void SetGauge (bool IsP1, int32 GaugeIndex, int32 Value)
 
void UseGauge (bool IsP1, int32 GaugeIndex, int32 Value)
 
bool IsTagBattle () const
 
void EndMatch ()
 

Public Attributes

FTransform BattleSceneTransform
 
ABattleObjectSortedObjects [MaxBattleObjects+MaxPlayerObjects] {}
 
class UNightSkyGameInstanceGameInstance = nullptr
 
class AParticleManagerParticleManager = nullptr
 
AAudioManagerAudioManager = nullptr
 
class ALevelSequenceActor * SequenceActor = nullptr
 
ACameraActor * CameraActor = nullptr
 
ACameraActor * SequenceCameraActor = nullptr
 
APlayerObjectSequenceTarget = nullptr
 
APlayerObjectSequenceEnemy = nullptr
 
bool bPauseGame = false
 
bool bViewCollision = false
 
bool bIsPlayingSequence = false
 
class AFighterLocalRunnerFighterRunner = nullptr
 
ANightSkyBattleHudActorBattleHudActor = nullptr
 
TArray< FRollbackDataMainRollbackData = {}
 
TArray< FBPRollbackDataBPRollbackData = {}
 
FBattleState BattleState = FBattleState()
 
TArray< UBattleExtension * > BattleExtensions = {}
 
TArray< FGameplayTag > BattleExtensionNames = {}
 
UBattleExtensionDataBattleExtensionData = {}
 
int32 LocalFrame = 0
 
int32 RemoteFrame = 0
 

Protected Member Functions

virtual void BeginPlay () override
 
void Init ()
 
void PlayIntros ()
 
void UpdateLocalInput ()
 
void SortObjects ()
 
void HandlePushCollision () const
 
void HandleHitCollision () const
 
void UpdateVisuals () const
 
void HandleRoundWin ()
 
virtual bool HandleMatchWin ()
 
void CollisionView () const
 
int32 CreateChecksum ()
 
FGGPONetworkStats GetNetworkStats () const
 

Protected Attributes

ABattleObjectObjects [MaxBattleObjects] {}
 
APlayerObjectPlayers [MaxPlayerObjects] {}
 

Detailed Description

Definition at line 197 of file NightSkyGameState.h.

Constructor & Destructor Documentation

◆ ANightSkyGameState()

ANightSkyGameState::ANightSkyGameState ( )

Definition at line 33 of file NightSkyGameState.cpp.

Member Function Documentation

◆ AddBattleObject()

ABattleObject * ANightSkyGameState::AddBattleObject ( const UState * InState,
int PosX,
int PosY,
EObjDir Dir,
int32 ObjectStateIndex,
bool bIsCommonState,
APlayerObject * Parent ) const

Definition at line 1059 of file NightSkyGameState.cpp.

◆ BattleHudVisibility()

void ANightSkyGameState::BattleHudVisibility ( bool Visible)

Definition at line 1517 of file NightSkyGameState.cpp.

◆ BeginPlay()

void ANightSkyGameState::BeginPlay ( )
overrideprotectedvirtual

Reimplemented in ANightSkyWTGameState.

Definition at line 40 of file NightSkyGameState.cpp.

◆ CallAssist()

APlayerObject * ANightSkyGameState::CallAssist ( const bool IsP1,
int AssistIndex,
const FGameplayTag AssistName )

Definition at line 1360 of file NightSkyGameState.cpp.

◆ CallBattleExtension()

void ANightSkyGameState::CallBattleExtension ( FGameplayTag Name)

Definition at line 1470 of file NightSkyGameState.cpp.

◆ CameraShake()

void ANightSkyGameState::CameraShake ( const TSubclassOf< UCameraShakeBase > & Pattern,
float Scale ) const

Definition at line 1238 of file NightSkyGameState.cpp.

◆ CanTag()

bool ANightSkyGameState::CanTag ( const APlayerObject * InPlayer,
int TeamIndex ) const

Definition at line 1379 of file NightSkyGameState.cpp.

◆ CollisionView()

void ANightSkyGameState::CollisionView ( ) const
protected

Definition at line 947 of file NightSkyGameState.cpp.

◆ CreateChecksum()

int32 ANightSkyGameState::CreateChecksum ( )
protected

Definition at line 958 of file NightSkyGameState.cpp.

◆ EndMatch()

void ANightSkyGameState::EndMatch ( )

◆ GetGauge()

int32 ANightSkyGameState::GetGauge ( bool IsP1,
int32 GaugeIndex ) const

Definition at line 1478 of file NightSkyGameState.cpp.

◆ GetLocalInputs()

int ANightSkyGameState::GetLocalInputs ( int Index) const

Definition at line 1397 of file NightSkyGameState.cpp.

◆ GetMainPlayer()

APlayerObject * ANightSkyGameState::GetMainPlayer ( bool IsP1) const

Definition at line 1464 of file NightSkyGameState.cpp.

◆ GetNetworkStats()

FGGPONetworkStats ANightSkyGameState::GetNetworkStats ( ) const
protected

Definition at line 985 of file NightSkyGameState.cpp.

◆ GetTeam()

TArray< APlayerObject * > ANightSkyGameState::GetTeam ( bool IsP1) const

Definition at line 1431 of file NightSkyGameState.cpp.

◆ HandleHitCollision()

void ANightSkyGameState::HandleHitCollision ( ) const
protected

Definition at line 566 of file NightSkyGameState.cpp.

◆ HandleMatchWin()

bool ANightSkyGameState::HandleMatchWin ( )
protectedvirtual

Reimplemented in ANightSkyWTGameState.

Definition at line 767 of file NightSkyGameState.cpp.

◆ HandlePushCollision()

void ANightSkyGameState::HandlePushCollision ( ) const
protected

Definition at line 552 of file NightSkyGameState.cpp.

◆ HandleRoundWin()

void ANightSkyGameState::HandleRoundWin ( )
protected

Definition at line 598 of file NightSkyGameState.cpp.

◆ Init()

void ANightSkyGameState::Init ( )
protected

Definition at line 66 of file NightSkyGameState.cpp.

◆ IsTagBattle()

bool ANightSkyGameState::IsTagBattle ( ) const

Definition at line 1507 of file NightSkyGameState.cpp.

◆ LoadGameState()

void ANightSkyGameState::LoadGameState ( )

Definition at line 1766 of file NightSkyGameState.cpp.

◆ ManageAudio()

void ANightSkyGameState::ManageAudio ( )

Definition at line 1617 of file NightSkyGameState.cpp.

◆ MatchInit()

void ANightSkyGameState::MatchInit ( )

Definition at line 300 of file NightSkyGameState.cpp.

◆ PlayAnnouncerVoice()

void ANightSkyGameState::PlayAnnouncerVoice ( USoundBase * InSoundWave,
float MaxDuration )

Definition at line 1575 of file NightSkyGameState.cpp.

◆ PlayCharaAudio()

void ANightSkyGameState::PlayCharaAudio ( USoundBase * InSoundWave,
float MaxDuration )

Definition at line 1542 of file NightSkyGameState.cpp.

◆ PlayCommonAudio()

void ANightSkyGameState::PlayCommonAudio ( USoundBase * InSoundWave,
float MaxDuration )

Definition at line 1522 of file NightSkyGameState.cpp.

◆ PlayIntros()

void ANightSkyGameState::PlayIntros ( )
protected

Definition at line 152 of file NightSkyGameState.cpp.

◆ PlayLevelSequence()

void ANightSkyGameState::PlayLevelSequence ( APlayerObject * Target,
APlayerObject * Enemy,
ULevelSequence * Sequence )

Definition at line 1171 of file NightSkyGameState.cpp.

◆ PlayMusic() [1/2]

void ANightSkyGameState::PlayMusic ( const FGameplayTag Name)

Definition at line 1588 of file NightSkyGameState.cpp.

◆ PlayMusic() [2/2]

void ANightSkyGameState::PlayMusic ( USoundBase * InSoundWave,
float MaxDuration )

Definition at line 1605 of file NightSkyGameState.cpp.

◆ PlayVoiceLine()

void ANightSkyGameState::PlayVoiceLine ( USoundBase * InSoundWave,
float MaxDuration,
int Player )

Definition at line 1562 of file NightSkyGameState.cpp.

◆ RollbackStartAudio()

void ANightSkyGameState::RollbackStartAudio ( int32 InFrame) const

Definition at line 1668 of file NightSkyGameState.cpp.

◆ RoundInit()

void ANightSkyGameState::RoundInit ( )

Definition at line 165 of file NightSkyGameState.cpp.

◆ SaveGameState()

void ANightSkyGameState::SaveGameState ( int32 * InChecksum)

Definition at line 1721 of file NightSkyGameState.cpp.

◆ ScreenPosToWorldPos()

void ANightSkyGameState::ScreenPosToWorldPos ( int32 X,
int32 Y,
int32 * OutX,
int32 * OutY ) const

Definition at line 1512 of file NightSkyGameState.cpp.

◆ SetDrawPriorityFront()

void ANightSkyGameState::SetDrawPriorityFront ( ABattleObject * InObject) const

Definition at line 1314 of file NightSkyGameState.cpp.

◆ SetGauge()

void ANightSkyGameState::SetGauge ( bool IsP1,
int32 GaugeIndex,
int32 Value )

Definition at line 1489 of file NightSkyGameState.cpp.

◆ SetOtherChecksum()

void ANightSkyGameState::SetOtherChecksum ( uint32 RemoteChecksum,
int32 InFrame )

Definition at line 1425 of file NightSkyGameState.cpp.

◆ SetScreenBounds()

void ANightSkyGameState::SetScreenBounds ( ) const

Definition at line 1016 of file NightSkyGameState.cpp.

◆ SetStageBounds()

void ANightSkyGameState::SetStageBounds ( )

Definition at line 1000 of file NightSkyGameState.cpp.

◆ SortObjects()

void ANightSkyGameState::SortObjects ( )
protected

Definition at line 531 of file NightSkyGameState.cpp.

◆ StartSuperFreeze()

void ANightSkyGameState::StartSuperFreeze ( int32 Duration,
int32 SelfDuration,
ABattleObject * CallingObject )

Definition at line 1051 of file NightSkyGameState.cpp.

◆ SwitchMainPlayer()

APlayerObject * ANightSkyGameState::SwitchMainPlayer ( APlayerObject * InPlayer,
int TeamIndex )

Definition at line 1334 of file NightSkyGameState.cpp.

◆ Tick()

void ANightSkyGameState::Tick ( float DeltaTime)
overridevirtual

Reimplemented in ANightSkyWTGameState.

Definition at line 293 of file NightSkyGameState.cpp.

◆ UpdateCamera()

void ANightSkyGameState::UpdateCamera ( )

Definition at line 1088 of file NightSkyGameState.cpp.

◆ UpdateGameState() [1/2]

void ANightSkyGameState::UpdateGameState ( )

Definition at line 524 of file NightSkyGameState.cpp.

◆ UpdateGameState() [2/2]

void ANightSkyGameState::UpdateGameState ( int32 Input1,
int32 Input2,
bool bShouldResimulate )

Definition at line 367 of file NightSkyGameState.cpp.

◆ UpdateHUD()

void ANightSkyGameState::UpdateHUD ( ) const

Definition at line 1248 of file NightSkyGameState.cpp.

◆ UpdateLocalInput()

void ANightSkyGameState::UpdateLocalInput ( )
protected

Definition at line 271 of file NightSkyGameState.cpp.

◆ UpdateRemoteInput()

void ANightSkyGameState::UpdateRemoteInput ( int RemoteInput[],
int32 InFrame )

Definition at line 1406 of file NightSkyGameState.cpp.

◆ UpdateVisuals()

void ANightSkyGameState::UpdateVisuals ( ) const
protected

Definition at line 588 of file NightSkyGameState.cpp.

◆ UseGauge()

void ANightSkyGameState::UseGauge ( bool IsP1,
int32 GaugeIndex,
int32 Value )

Definition at line 1498 of file NightSkyGameState.cpp.

Member Data Documentation

◆ AudioManager

AAudioManager* ANightSkyGameState::AudioManager = nullptr

Definition at line 223 of file NightSkyGameState.h.

◆ BattleExtensionData

UBattleExtensionData* ANightSkyGameState::BattleExtensionData = {}

Definition at line 259 of file NightSkyGameState.h.

◆ BattleExtensionNames

TArray<FGameplayTag> ANightSkyGameState::BattleExtensionNames = {}

Definition at line 256 of file NightSkyGameState.h.

◆ BattleExtensions

TArray<UBattleExtension*> ANightSkyGameState::BattleExtensions = {}

Definition at line 255 of file NightSkyGameState.h.

◆ BattleHudActor

ANightSkyBattleHudActor* ANightSkyGameState::BattleHudActor = nullptr

Definition at line 246 of file NightSkyGameState.h.

◆ BattleSceneTransform

FTransform ANightSkyGameState::BattleSceneTransform

Definition at line 212 of file NightSkyGameState.h.

◆ BattleState

FBattleState ANightSkyGameState::BattleState = FBattleState()

Definition at line 252 of file NightSkyGameState.h.

◆ bIsPlayingSequence

bool ANightSkyGameState::bIsPlayingSequence = false

Definition at line 241 of file NightSkyGameState.h.

◆ bPauseGame

bool ANightSkyGameState::bPauseGame = false

Definition at line 236 of file NightSkyGameState.h.

◆ BPRollbackData

TArray<FBPRollbackData> ANightSkyGameState::BPRollbackData = {}

Definition at line 249 of file NightSkyGameState.h.

◆ bViewCollision

bool ANightSkyGameState::bViewCollision = false

Definition at line 238 of file NightSkyGameState.h.

◆ CameraActor

ACameraActor* ANightSkyGameState::CameraActor = nullptr

Definition at line 228 of file NightSkyGameState.h.

◆ FighterRunner

class AFighterLocalRunner* ANightSkyGameState::FighterRunner = nullptr

Definition at line 244 of file NightSkyGameState.h.

◆ GameInstance

class UNightSkyGameInstance* ANightSkyGameState::GameInstance = nullptr

Definition at line 218 of file NightSkyGameState.h.

◆ LocalFrame

int32 ANightSkyGameState::LocalFrame = 0

Definition at line 261 of file NightSkyGameState.h.

◆ MainRollbackData

TArray<FRollbackData> ANightSkyGameState::MainRollbackData = {}

Definition at line 248 of file NightSkyGameState.h.

◆ Objects

ABattleObject* ANightSkyGameState::Objects[MaxBattleObjects] {}
protected

Definition at line 203 of file NightSkyGameState.h.

◆ ParticleManager

class AParticleManager* ANightSkyGameState::ParticleManager = nullptr

Definition at line 221 of file NightSkyGameState.h.

◆ Players

APlayerObject* ANightSkyGameState::Players[MaxPlayerObjects] {}
protected

Definition at line 205 of file NightSkyGameState.h.

◆ RemoteFrame

int32 ANightSkyGameState::RemoteFrame = 0

Definition at line 262 of file NightSkyGameState.h.

◆ SequenceActor

class ALevelSequenceActor* ANightSkyGameState::SequenceActor = nullptr

Definition at line 226 of file NightSkyGameState.h.

◆ SequenceCameraActor

ACameraActor* ANightSkyGameState::SequenceCameraActor = nullptr

Definition at line 230 of file NightSkyGameState.h.

◆ SequenceEnemy

APlayerObject* ANightSkyGameState::SequenceEnemy = nullptr

Definition at line 234 of file NightSkyGameState.h.

◆ SequenceTarget

APlayerObject* ANightSkyGameState::SequenceTarget = nullptr

Definition at line 232 of file NightSkyGameState.h.

◆ SortedObjects

ABattleObject* ANightSkyGameState::SortedObjects[MaxBattleObjects+MaxPlayerObjects] {}

Definition at line 215 of file NightSkyGameState.h.


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