Night Sky Engine
A fighting game framework made in Unreal Engine
|
#include <NightSkyGameState.h>
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 |
ABattleObject * | AddBattleObject (const UState *InState, int PosX, int PosY, EObjDir Dir, int32 ObjectStateIndex, bool bIsCommonState, APlayerObject *Parent) const |
void | SetDrawPriorityFront (ABattleObject *InObject) const |
APlayerObject * | SwitchMainPlayer (APlayerObject *InPlayer, int TeamIndex) |
APlayerObject * | CallAssist (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 |
APlayerObject * | GetMainPlayer (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 |
ABattleObject * | SortedObjects [MaxBattleObjects+MaxPlayerObjects] {} |
class UNightSkyGameInstance * | GameInstance = nullptr |
class AParticleManager * | ParticleManager = nullptr |
AAudioManager * | AudioManager = nullptr |
class ALevelSequenceActor * | SequenceActor = nullptr |
ACameraActor * | CameraActor = nullptr |
ACameraActor * | SequenceCameraActor = nullptr |
APlayerObject * | SequenceTarget = nullptr |
APlayerObject * | SequenceEnemy = nullptr |
bool | bPauseGame = false |
bool | bViewCollision = false |
bool | bIsPlayingSequence = false |
class AFighterLocalRunner * | FighterRunner = nullptr |
ANightSkyBattleHudActor * | BattleHudActor = nullptr |
TArray< FRollbackData > | MainRollbackData = {} |
TArray< FBPRollbackData > | BPRollbackData = {} |
FBattleState | BattleState = FBattleState() |
TArray< UBattleExtension * > | BattleExtensions = {} |
TArray< FGameplayTag > | BattleExtensionNames = {} |
UBattleExtensionData * | BattleExtensionData = {} |
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 | |
ABattleObject * | Objects [MaxBattleObjects] {} |
APlayerObject * | Players [MaxPlayerObjects] {} |
Definition at line 197 of file NightSkyGameState.h.
ANightSkyGameState::ANightSkyGameState | ( | ) |
Definition at line 33 of file NightSkyGameState.cpp.
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.
void ANightSkyGameState::BattleHudVisibility | ( | bool | Visible | ) |
Definition at line 1517 of file NightSkyGameState.cpp.
|
overrideprotectedvirtual |
Reimplemented in ANightSkyWTGameState.
Definition at line 40 of file NightSkyGameState.cpp.
APlayerObject * ANightSkyGameState::CallAssist | ( | const bool | IsP1, |
int | AssistIndex, | ||
const FGameplayTag | AssistName ) |
Definition at line 1360 of file NightSkyGameState.cpp.
void ANightSkyGameState::CallBattleExtension | ( | FGameplayTag | Name | ) |
Definition at line 1470 of file NightSkyGameState.cpp.
void ANightSkyGameState::CameraShake | ( | const TSubclassOf< UCameraShakeBase > & | Pattern, |
float | Scale ) const |
Definition at line 1238 of file NightSkyGameState.cpp.
bool ANightSkyGameState::CanTag | ( | const APlayerObject * | InPlayer, |
int | TeamIndex ) const |
Definition at line 1379 of file NightSkyGameState.cpp.
|
protected |
Definition at line 947 of file NightSkyGameState.cpp.
|
protected |
Definition at line 958 of file NightSkyGameState.cpp.
void ANightSkyGameState::EndMatch | ( | ) |
int32 ANightSkyGameState::GetGauge | ( | bool | IsP1, |
int32 | GaugeIndex ) const |
Definition at line 1478 of file NightSkyGameState.cpp.
int ANightSkyGameState::GetLocalInputs | ( | int | Index | ) | const |
Definition at line 1397 of file NightSkyGameState.cpp.
APlayerObject * ANightSkyGameState::GetMainPlayer | ( | bool | IsP1 | ) | const |
Definition at line 1464 of file NightSkyGameState.cpp.
|
protected |
Definition at line 985 of file NightSkyGameState.cpp.
TArray< APlayerObject * > ANightSkyGameState::GetTeam | ( | bool | IsP1 | ) | const |
Definition at line 1431 of file NightSkyGameState.cpp.
|
protected |
Definition at line 566 of file NightSkyGameState.cpp.
|
protectedvirtual |
Reimplemented in ANightSkyWTGameState.
Definition at line 767 of file NightSkyGameState.cpp.
|
protected |
Definition at line 552 of file NightSkyGameState.cpp.
|
protected |
Definition at line 598 of file NightSkyGameState.cpp.
|
protected |
Definition at line 66 of file NightSkyGameState.cpp.
bool ANightSkyGameState::IsTagBattle | ( | ) | const |
Definition at line 1507 of file NightSkyGameState.cpp.
void ANightSkyGameState::LoadGameState | ( | ) |
Definition at line 1766 of file NightSkyGameState.cpp.
void ANightSkyGameState::ManageAudio | ( | ) |
Definition at line 1617 of file NightSkyGameState.cpp.
void ANightSkyGameState::MatchInit | ( | ) |
Definition at line 300 of file NightSkyGameState.cpp.
void ANightSkyGameState::PlayAnnouncerVoice | ( | USoundBase * | InSoundWave, |
float | MaxDuration ) |
Definition at line 1575 of file NightSkyGameState.cpp.
void ANightSkyGameState::PlayCharaAudio | ( | USoundBase * | InSoundWave, |
float | MaxDuration ) |
Definition at line 1542 of file NightSkyGameState.cpp.
void ANightSkyGameState::PlayCommonAudio | ( | USoundBase * | InSoundWave, |
float | MaxDuration ) |
Definition at line 1522 of file NightSkyGameState.cpp.
|
protected |
Definition at line 152 of file NightSkyGameState.cpp.
void ANightSkyGameState::PlayLevelSequence | ( | APlayerObject * | Target, |
APlayerObject * | Enemy, | ||
ULevelSequence * | Sequence ) |
Definition at line 1171 of file NightSkyGameState.cpp.
void ANightSkyGameState::PlayMusic | ( | const FGameplayTag | Name | ) |
Definition at line 1588 of file NightSkyGameState.cpp.
void ANightSkyGameState::PlayMusic | ( | USoundBase * | InSoundWave, |
float | MaxDuration ) |
Definition at line 1605 of file NightSkyGameState.cpp.
void ANightSkyGameState::PlayVoiceLine | ( | USoundBase * | InSoundWave, |
float | MaxDuration, | ||
int | Player ) |
Definition at line 1562 of file NightSkyGameState.cpp.
void ANightSkyGameState::RollbackStartAudio | ( | int32 | InFrame | ) | const |
Definition at line 1668 of file NightSkyGameState.cpp.
void ANightSkyGameState::RoundInit | ( | ) |
Definition at line 165 of file NightSkyGameState.cpp.
void ANightSkyGameState::SaveGameState | ( | int32 * | InChecksum | ) |
Definition at line 1721 of file NightSkyGameState.cpp.
void ANightSkyGameState::ScreenPosToWorldPos | ( | int32 | X, |
int32 | Y, | ||
int32 * | OutX, | ||
int32 * | OutY ) const |
Definition at line 1512 of file NightSkyGameState.cpp.
void ANightSkyGameState::SetDrawPriorityFront | ( | ABattleObject * | InObject | ) | const |
Definition at line 1314 of file NightSkyGameState.cpp.
void ANightSkyGameState::SetGauge | ( | bool | IsP1, |
int32 | GaugeIndex, | ||
int32 | Value ) |
Definition at line 1489 of file NightSkyGameState.cpp.
void ANightSkyGameState::SetOtherChecksum | ( | uint32 | RemoteChecksum, |
int32 | InFrame ) |
Definition at line 1425 of file NightSkyGameState.cpp.
void ANightSkyGameState::SetScreenBounds | ( | ) | const |
Definition at line 1016 of file NightSkyGameState.cpp.
void ANightSkyGameState::SetStageBounds | ( | ) |
Definition at line 1000 of file NightSkyGameState.cpp.
|
protected |
Definition at line 531 of file NightSkyGameState.cpp.
void ANightSkyGameState::StartSuperFreeze | ( | int32 | Duration, |
int32 | SelfDuration, | ||
ABattleObject * | CallingObject ) |
Definition at line 1051 of file NightSkyGameState.cpp.
APlayerObject * ANightSkyGameState::SwitchMainPlayer | ( | APlayerObject * | InPlayer, |
int | TeamIndex ) |
Definition at line 1334 of file NightSkyGameState.cpp.
|
overridevirtual |
Reimplemented in ANightSkyWTGameState.
Definition at line 293 of file NightSkyGameState.cpp.
void ANightSkyGameState::UpdateCamera | ( | ) |
Definition at line 1088 of file NightSkyGameState.cpp.
void ANightSkyGameState::UpdateGameState | ( | ) |
Definition at line 524 of file NightSkyGameState.cpp.
void ANightSkyGameState::UpdateGameState | ( | int32 | Input1, |
int32 | Input2, | ||
bool | bShouldResimulate ) |
Definition at line 367 of file NightSkyGameState.cpp.
void ANightSkyGameState::UpdateHUD | ( | ) | const |
Definition at line 1248 of file NightSkyGameState.cpp.
|
protected |
Definition at line 271 of file NightSkyGameState.cpp.
void ANightSkyGameState::UpdateRemoteInput | ( | int | RemoteInput[], |
int32 | InFrame ) |
Definition at line 1406 of file NightSkyGameState.cpp.
|
protected |
Definition at line 588 of file NightSkyGameState.cpp.
void ANightSkyGameState::UseGauge | ( | bool | IsP1, |
int32 | GaugeIndex, | ||
int32 | Value ) |
Definition at line 1498 of file NightSkyGameState.cpp.
AAudioManager* ANightSkyGameState::AudioManager = nullptr |
Definition at line 223 of file NightSkyGameState.h.
UBattleExtensionData* ANightSkyGameState::BattleExtensionData = {} |
Definition at line 259 of file NightSkyGameState.h.
TArray<FGameplayTag> ANightSkyGameState::BattleExtensionNames = {} |
Definition at line 256 of file NightSkyGameState.h.
TArray<UBattleExtension*> ANightSkyGameState::BattleExtensions = {} |
Definition at line 255 of file NightSkyGameState.h.
ANightSkyBattleHudActor* ANightSkyGameState::BattleHudActor = nullptr |
Definition at line 246 of file NightSkyGameState.h.
FTransform ANightSkyGameState::BattleSceneTransform |
Definition at line 212 of file NightSkyGameState.h.
FBattleState ANightSkyGameState::BattleState = FBattleState() |
Definition at line 252 of file NightSkyGameState.h.
bool ANightSkyGameState::bIsPlayingSequence = false |
Definition at line 241 of file NightSkyGameState.h.
bool ANightSkyGameState::bPauseGame = false |
Definition at line 236 of file NightSkyGameState.h.
TArray<FBPRollbackData> ANightSkyGameState::BPRollbackData = {} |
Definition at line 249 of file NightSkyGameState.h.
bool ANightSkyGameState::bViewCollision = false |
Definition at line 238 of file NightSkyGameState.h.
ACameraActor* ANightSkyGameState::CameraActor = nullptr |
Definition at line 228 of file NightSkyGameState.h.
class AFighterLocalRunner* ANightSkyGameState::FighterRunner = nullptr |
Definition at line 244 of file NightSkyGameState.h.
class UNightSkyGameInstance* ANightSkyGameState::GameInstance = nullptr |
Definition at line 218 of file NightSkyGameState.h.
int32 ANightSkyGameState::LocalFrame = 0 |
Definition at line 261 of file NightSkyGameState.h.
TArray<FRollbackData> ANightSkyGameState::MainRollbackData = {} |
Definition at line 248 of file NightSkyGameState.h.
|
protected |
Definition at line 203 of file NightSkyGameState.h.
class AParticleManager* ANightSkyGameState::ParticleManager = nullptr |
Definition at line 221 of file NightSkyGameState.h.
|
protected |
Definition at line 205 of file NightSkyGameState.h.
int32 ANightSkyGameState::RemoteFrame = 0 |
Definition at line 262 of file NightSkyGameState.h.
class ALevelSequenceActor* ANightSkyGameState::SequenceActor = nullptr |
Definition at line 226 of file NightSkyGameState.h.
ACameraActor* ANightSkyGameState::SequenceCameraActor = nullptr |
Definition at line 230 of file NightSkyGameState.h.
APlayerObject* ANightSkyGameState::SequenceEnemy = nullptr |
Definition at line 234 of file NightSkyGameState.h.
APlayerObject* ANightSkyGameState::SequenceTarget = nullptr |
Definition at line 232 of file NightSkyGameState.h.
ABattleObject* ANightSkyGameState::SortedObjects[MaxBattleObjects+MaxPlayerObjects] {} |
Definition at line 215 of file NightSkyGameState.h.