46 virtual void Initialize(FSubsystemCollectionBase& Collection)
override;
47 virtual void Deinitialize()
override;
49 virtual void PlayerControllerChanged(APlayerController* NewPlayerController)
override;
51 virtual void OnLevelStreamingEnded()
override;
52 virtual void OnLevelStreamingStarted()
override;
60 void UnregisterSpawnedWeapon(
const FGameplayTag& WeaponTag,
const ATargetableWeapon* SpawnedWeapon =
nullptr);
61 bool EquipWeapon(
const FGameplayTag& NewWeaponTag);
62 bool SwapWeapon(
const FGameplayTag& NewWeaponTag);
63 bool HandlePlayerSpawn(AActor* PlayerActor,
const FPrimaryAssetId& LevelAssetID,
const UObject* LevelContextObject);
66 UFUNCTION(BlueprintCallable, Category =
"Player|Streaming")
69 UFUNCTION(BlueprintCallable, Category = "
Player|Streaming")
70 void UnfreezePlayer();
72 UFUNCTION(BlueprintCallable, Category = "
Player|Respawn")
75 void CacheLastStageEventID(const FName StageEventID);
77 UFUNCTION(BlueprintCallable, Category = "
Player|Respawn")
80 UFUNCTION(BlueprintCallable, Category = "
Player|Death")
81 bool HandlePlayerDeath(AActor* PlayerActor);
83 UFUNCTION(BlueprintCallable, Category = "
Player|Spawn")
84 bool HandlePlayerSpawn(AActor* PlayerActor, const UObject* LevelContextObject =
nullptr);
86 UFUNCTION(BlueprintCallable, Category = "
Player|
UI")
87 void ApplyUILayerInputBlockOptions(
bool bBlockPlayerMovement,
bool bBlockPlayerInput);
90 FORCEINLINE FGameplayTag GetPreviousWeaponTag()
const
92 return PreviousWeaponTag;
97 return CurrentWeaponTag;
102 return ResolveOwningPlayer();
107 return CurrentWeaponTag == TAG_WEAPON_SWORD ? TAG_WEAPON_STAFF : TAG_WEAPON_SWORD;
112 return Cast<AMainPlayerState>(GetPlayer()->GetPlayerState());
116 bool ApplyWeapon(
const FGameplayTag& NewWeaponTag,
bool bActivateSwapInSkill);
117 void UpdateEquippedWeapon(
const FGameplayTag& NewWeaponTag);
118 void BindControllerDelegates(APlayerController* PlayerController);
119 void UnbindControllerDelegates(APlayerController* PlayerController);
120 ACharacter* ResolveOwningCharacter()
const;
122 UAbilitySystemComponent* ResolveOwningAbilitySystemComponent()
const;
123 ULevelRuleData* ResolveCurrentLevelRule(
const UObject* LevelContextObject =
nullptr)
const;
124 ULevelRuleData* ResolveCurrentLevelRule(
const FPrimaryAssetId& LevelAssetID,
const UObject* LevelContextObject)
const;
125 void RefreshUILayerInputBlockTags();
126 void AddUILayerInputBlockTag(UAbilitySystemComponent* AbilitySystemComponent, FGameplayTag Tag,
bool& bAppliedFlag);
127 void RemoveUILayerInputBlockTag(FGameplayTag Tag,
bool& bAppliedFlag);
131 void OnPlayerWeaponChanged(FGameplayTag PrevWeaponTag, FGameplayTag NewWeaponTag);
134 void HandlePossessedPawnChanged(APawn* OldPawn, APawn* NewPawn);
137 FPlayerWeaponChangedDelegate WeaponChangedDelegate;
144 TWeakObjectPtr<APlayerController> BoundPC;
147 bool bFrozen = false;
150 FGameplayTag PreviousWeaponTag;
153 FGameplayTag CurrentWeaponTag;
162 FTransform CachedCheckPointTransform;
165 bool bHasCachedCheckPoint = false;
168 FName LastStageEventIDBeforeDeath = NAME_None;
177 float CachedSpawnFlowGravityScale = 1.0f;
180 bool bHasCachedSpawnFlowGravityScale = false;
183 TWeakObjectPtr<UAbilitySystemComponent> UILayerBlockASC;
186 bool bShouldBlockUILayerMovement = false;
189 bool bShouldBlockUILayerInput = false;
192 bool bAppliedUILayerMovementBlock = false;
195 bool bAppliedUILayerInputBlock = false;
198 FName CachedRollbackPointID = NAME_None;
199 TEnumAsByte<ECollisionEnabled::Type> SavedCapsuleCollision = ECollisionEnabled::QueryAndPhysics;
Definition MainPlayerCharacter.h:39
Definition MainPlayerState.h:23