调整坦克移动方式,调整鼠标控制炮塔转动,移动方式有点奇怪,应该再加个倒退,或者再尝试传统坦克移动模式,鼠标控制炮塔转动在某些角度lerp的时候会疯狂抖动。待解决。
This commit is contained in:
@@ -86,3 +86,8 @@ ConnectionType=USBOnly
|
|||||||
bUseManualIPAddress=False
|
bUseManualIPAddress=False
|
||||||
ManualIPAddress=
|
ManualIPAddress=
|
||||||
|
|
||||||
|
[/Script/Engine.UserInterfaceSettings]
|
||||||
|
UIScaleRule=Custom
|
||||||
|
DesignScreenSize=(X=2560,Y=1440)
|
||||||
|
UIScaleCurve=(EditorCurveData=(Keys=((Time=1080.000000,Value=1.000000),(Time=1440.000000,Value=1.000000),(Time=8640.000000,Value=1.000000)),DefaultValue=340282346638528859811704183484516925440.000000,PreInfinityExtrap=RCCE_Constant,PostInfinityExtrap=RCCE_Constant),ExternalCurve=None)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,6 +8,6 @@ public class AncientCivil : ModuleRules
|
|||||||
{
|
{
|
||||||
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
|
||||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "NavigationSystem", "AIModule", "Niagara", "EnhancedInput","JsEnv" });
|
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "NavigationSystem", "AIModule", "Niagara", "EnhancedInput","JsEnv","SlateCore","Slate" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#include "GameBPExtension.h"
|
||||||
|
#include "Framework/Application/SlateApplication.h"
|
||||||
|
|
||||||
|
|
||||||
|
UGameBPExtension::UGameBPExtension(const FObjectInitializer& ObjectInitializer)
|
||||||
|
: Super(ObjectInitializer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
FVector2D UGameBPExtension::GetGameWindowSize() {
|
||||||
|
if (FSlateApplication::IsInitialized()) {
|
||||||
|
TArray<TSharedRef<SWindow>> GameWindows = FSlateApplication::Get().GetInteractiveTopLevelWindows();
|
||||||
|
TSharedPtr<SWindow> GameWindow = GameWindows[0];
|
||||||
|
if (GameWindow.IsValid()) {
|
||||||
|
return GameWindow->GetSizeInScreen(); // 返回窗口的物理尺寸(单位:像素)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return FVector2D(0, 0);
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Uobject/Class.h"
|
||||||
|
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||||
|
#include "GameBPExtension.generated.h"
|
||||||
|
|
||||||
|
UCLASS(meta = (ScriptName = "UGameBPExtension"))
|
||||||
|
class UGameBPExtension :public UBlueprintFunctionLibrary
|
||||||
|
{
|
||||||
|
GENERATED_UCLASS_BODY()
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = "Window Utils")
|
||||||
|
static FVector2D GetGameWindowSize();
|
||||||
|
};
|
||||||
|
|
||||||
Reference in New Issue
Block a user