KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
Trolley.h
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong. All rights reserved. Unauthorized copying, modification, or distribution of this file, via any medium is strictly prohibited. Proprietary and confidential.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/Actor.h"
7#include "Trolley.generated.h"
8
9UCLASS()
10class ONEPIECE_API ATrolley : public AActor
11{
12 GENERATED_BODY()
13
14public:
15 // Sets default values for this actor's properties
16 ATrolley();
17
18protected:
19 // Called when the game starts or when spawned
20 virtual void BeginPlay() override;
21
22public:
23 // Called every frame
24 virtual void Tick(float DeltaTime) override;
25
26public:
27 // Components
28
30 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
31 TObjectPtr<class UStaticMeshComponent> MeshComp;
32
34 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
35 TObjectPtr<class UInteractableComponent> InteractableComp;
36
37 // ========================================
38 // Movement Properties
39 // ========================================
40
42 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Movement")
43 float PushForce = 500.0f;
44
46 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Movement")
47 float Deceleration = 300.0f;
48
50 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Movement")
51 float MinVelocityThreshold = 5.0f;
52
54 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Movement")
55 float CollisionPushMultiplier = 0.5f;
56
57private:
59 FVector CurrentVelocity;
60
65 UFUNCTION()
66 void OnPushed(AActor* Interactor);
67
76 UFUNCTION()
77 void OnTrolleyHit(UPrimitiveComponent* HitComponent, AActor* OtherActor,
78 UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
79
84 UFUNCTION()
85 void OnOutlineStateChanged(bool bShouldShowOutline);
86};