1.增加贴花,铁锤模式时,贴花跟随鼠标移动,在铁块表面显示击打区域。
2.调整输入方式,在铁锤模式时,整体切换IMC输入。 3.修改铁块材质
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -29,14 +29,24 @@ CurrentImpactNormal()
|
||||
|
||||
StaticMeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMeshComponent"));
|
||||
RootComponent = StaticMeshComp;
|
||||
// 设置默认网格(立方体)
|
||||
}
|
||||
void AIronBlock::PostInitProperties()
|
||||
{
|
||||
// 必须调用父类实现
|
||||
Super::PostInitProperties();
|
||||
|
||||
// 检查:如果 StaticMeshComp 没有被赋予任何网格(即在编辑器中没有设置)
|
||||
// 并且我们正在处理 Class Default Object (CDO),通常用来设置类级的默认值
|
||||
if (StaticMeshComp && !StaticMeshComp->GetStaticMesh())
|
||||
{
|
||||
// 只有当网格为空时,才加载并设置默认的 Cube
|
||||
UStaticMesh* DefaultMesh = LoadObject<UStaticMesh>(nullptr, TEXT("/Engine/BasicShapes/Cube"));
|
||||
if (DefaultMesh)
|
||||
{
|
||||
StaticMeshComp->SetStaticMesh(DefaultMesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called when the game starts or when spawned
|
||||
void AIronBlock::BeginPlay()
|
||||
{
|
||||
|
||||
@@ -17,7 +17,6 @@ UCLASS()
|
||||
class BLADESMITH_API AIronBlock : public AActor
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
UStaticMeshComponent* StaticMeshComp;
|
||||
|
||||
@@ -44,7 +43,7 @@ protected:
|
||||
// Called when the game starts or when spawned
|
||||
virtual void BeginPlay() override;
|
||||
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
|
||||
|
||||
virtual void PostInitProperties();
|
||||
/** 初始化两个渲染目标和它们的初始数据 */
|
||||
void InitializePositionTexture();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user