MCPcopy Create free account
hub / github.com/arnaud-jamin/Cog / ACogSamplePlayerController

Class ACogSamplePlayerController

Source/CogSample/CogSamplePlayerController.h:20–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18//--------------------------------------------------------------------------------------------------------------------------
19UCLASS(config=Game)
20class ACogSamplePlayerController
21 : public APlayerController
22 , public ICogCommonPossessorInterface
23{
24 GENERATED_BODY()
25
26public:
27
28 static const ACogSamplePlayerController* GetFirstLocalPlayerControllerConst(const UObject* WorldContextObject);
29
30 static ACogSamplePlayerController* GetFirstLocalPlayerController(const UObject* WorldContextObject);
31
32 ACogSamplePlayerController();
33
34 virtual void BeginPlay() override;
35
36 virtual void Tick(float DeltaSeconds) override;
37
38 float GetClientLag() const;
39
40 //----------------------------------------------------------------------------------------------------------------------
41 // Possession
42 //----------------------------------------------------------------------------------------------------------------------
43 UFUNCTION(BlueprintCallable)
44 virtual void SetPossession(APawn* NewPawn) override;
45
46 UFUNCTION(BlueprintCallable)
47 virtual void ResetPossession() override;
48
49 virtual void OnPossess(APawn* NewPawn) override;
50
51 virtual void AcknowledgePossession(APawn* NewPawn) override;
52
53 UPROPERTY(BlueprintAssignable)
54 FCogSampleControlledCharacterChangedEventDelegate OnControlledCharacterChanged;
55
56 //----------------------------------------------------------------------------------------------------------------------
57 // Targeting
58 //----------------------------------------------------------------------------------------------------------------------
59 void SetTarget(AActor* Value);
60
61 AActor* GetTarget() const { return Target.Get(); }
62
63 UPROPERTY(BlueprintAssignable)
64 FCogSampleTargetChangedEventDelegate OnTargetChanged;
65
66 //----------------------------------------------------------------------------------------------------------------------
67 // Spawn Predictions
68 //----------------------------------------------------------------------------------------------------------------------
69 UPROPERTY()
70 TArray<UCogSampleSpawnPredictionComponent*> SpawnPredictions;
71
72 //----------------------------------------------------------------------------------------------------------------------
73 // Projectile Hit
74 //----------------------------------------------------------------------------------------------------------------------
75 UFUNCTION(Reliable, Server)
76 void Server_ProjectileHit(UCogSampleProjectileComponent* Projectile, const FHitResult& HitResult);
77

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected