feat: 增加移动中
This commit is contained in:
BIN
Content/Blueprints/BP_TestChar.uasset
LFS
Normal file
BIN
Content/Blueprints/BP_TestChar.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Blueprints/BP_TestCtl.uasset
LFS
Normal file
BIN
Content/Blueprints/BP_TestCtl.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Blueprints/BP_TestMode.uasset
LFS
Normal file
BIN
Content/Blueprints/BP_TestMode.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
14
Source/lonese/MyPlayerController.cpp
Normal file
14
Source/lonese/MyPlayerController.cpp
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "MyPlayerController.h"
|
||||||
|
|
||||||
|
APawn* AMyPlayerController::GetOwnedPawn()
|
||||||
|
{
|
||||||
|
return GetPawn();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AMyPlayerController::BeginPlay()
|
||||||
|
{
|
||||||
|
//GetPawn()->SetActorLocation(FVector(0.f, 0.f, 300.f));
|
||||||
|
}
|
||||||
26
Source/lonese/MyPlayerController.h
Normal file
26
Source/lonese/MyPlayerController.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/PlayerController.h"
|
||||||
|
#include "MyPlayerController.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class LONESE_API AMyPlayerController : public APlayerController
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
|
APawn* GetOwnedPawn();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user