| 18 | //-------------------------------------------------------------------------------------------------------------------------- |
| 19 | UCLASS(config=Game) |
| 20 | class ACogSamplePlayerController |
| 21 | : public APlayerController |
| 22 | , public ICogCommonPossessorInterface |
| 23 | { |
| 24 | GENERATED_BODY() |
| 25 | |
| 26 | public: |
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected