A context object that binds to a LocalPlayer. 更多...
#include <LocalPlayer.h>
Public 成员函数 | |
| UGameInstance * | GetGameInstance () const |
| Returns the game instance | |
| class AGameStateBase * | GetGameState () const |
| Getter for the Game State Base | |
| template<class T > | |
| FORCEINLINE T * | GetGameState (bool bCastChecked=false) const |
| Templated Getter for the Game State | |
| class AHUD * | GetHUD () const |
| Getter for this player's HUD | |
| template<class T > | |
| FORCEINLINE T * | GetHUD (bool bCastChecked=false) const |
| Templated Getter for the HUD | |
| class ULocalPlayer * | GetLocalPlayer () const |
| Returns the local player. | |
| class APawn * | GetPawn () const |
| Getter for the base pawn of this player | |
| template<class T > | |
| FORCEINLINE T * | GetPawn (bool bCastChecked=false) const |
| Templated getter for the player's pawn | |
| class APlayerController * | GetPlayerController () const |
| Returns the player controller. | |
| template<class T > | |
| FORCEINLINE T * | GetPlayerController (bool bCastChecked=false) const |
| Templated version of GetPlayerController() | |
| class APlayerState * | GetPlayerState () const |
| Getter for the Player State | |
| template<class T > | |
| FORCEINLINE T * | GetPlayerState (bool bCastChecked=false) const |
| Templated Getter for the Player State | |
| UWorld * | GetWorld () const |
| Returns the world context. | |
| bool | IsFromLocalPlayer (const AActor *ActorToTest) const |
| This function tests if the given Actor is connected to the Local Player in any way. 更多... | |
| bool | IsInitialized () const |
| Is this context initialized | |
| bool | IsValid () const |
| Is this context initialized and still valid? | |
A context object that binds to a LocalPlayer.
Useful for UI or other things that need to pass around player references
| bool FLocalPlayerContext::IsFromLocalPlayer | ( | const AActor * | ActorToTest | ) | const |
This function tests if the given Actor is connected to the Local Player in any way.
It tests against the APlayerController, APlayerState, and APawn.