UE4 C++行內函數
阿新 • • 發佈:2018-12-14
#pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "Components/SphereComponent.h" #include "Collecable.generated.h" UCLASS() class PACMAN_API ACollecable : public AActor { GENERATED_BODY() public: // Sets default values for this actor's properties ACollecable(); protected: // Called when the game starts or when spawned virtual void BeginPlay() override; public: // Called every frame virtual void Tick(float DeltaTime) override; int GetCurrentNum() const; }; FORCEINLINE int ACollecable::GetCurrentNum() const { return 0; }