feat: 初步添加网络支持
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Blueprints/Component/BP_ControllerComp.uasset
LFS
Normal file
BIN
Content/Blueprints/Component/BP_ControllerComp.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
@@ -17,3 +17,10 @@ void AMyPlayerController::CalcCamera(float DeltaTime, FMinimalViewInfo& OutResul
|
|||||||
{
|
{
|
||||||
AActor::CalcCamera(DeltaTime, OutResult);
|
AActor::CalcCamera(DeltaTime, OutResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AMyPlayerController::AcknowledgePossession(APawn* P)
|
||||||
|
{
|
||||||
|
Super::AcknowledgePossession(P);
|
||||||
|
|
||||||
|
OnClientPossessFinished(P);
|
||||||
|
}
|
||||||
|
|||||||
@@ -18,8 +18,12 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
APawn* GetOwnedPawn();
|
APawn* GetOwnedPawn();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintImplementableEvent)
|
||||||
|
void OnClientPossessFinished(APawn* P);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void CalcCamera(float DeltaTime, FMinimalViewInfo& OutResult) override;
|
virtual void CalcCamera(float DeltaTime, FMinimalViewInfo& OutResult) override;
|
||||||
|
virtual void AcknowledgePossession(APawn* P) override;
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user