62 lines
1.7 KiB
C++
62 lines
1.7 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "SlimableInterface.h"
|
|
|
|
#include "Hammer.generated.h"
|
|
|
|
UCLASS()
|
|
class WIZARDINGCENTRAL_API AHammer : public AActor, public ISlimableInterface
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
// Sets default values for this actor's properties
|
|
AHammer();
|
|
|
|
protected:
|
|
// Called when the game starts or when spawned
|
|
virtual void BeginPlay() override;
|
|
|
|
public:
|
|
// Called every frame
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
// Called when slimed
|
|
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "StickySlime")
|
|
void OnSlimed(AActor* Slime);
|
|
virtual void OnSlimed_Implementation(AActor* Slime) override;
|
|
|
|
// Called when un-slimed
|
|
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "StickySlime")
|
|
void OnUnslimed();
|
|
virtual void OnUnslimed_Implementation() override;
|
|
|
|
protected:
|
|
UFUNCTION()
|
|
virtual void OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComponent,
|
|
FVector NormalImpulse, const FHitResult& Hit);
|
|
|
|
private:
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Hammer", meta = (AllowPrivateAccess = "true"))
|
|
class UStaticMeshComponent* MeshComponent;
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hammer", meta = (AllowPrivateAccess = "true"))
|
|
float GroundIdleTime;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hammer", meta = (AllowPrivateAccess = "true"))
|
|
float AirIdleTime;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hammer", meta = (AllowPrivateAccess = "true"))
|
|
float LiftSpeed;
|
|
|
|
FVector InitialLocation;
|
|
bool bIsSlimed;
|
|
bool bIsMovingUp;
|
|
float IdleTimer;
|
|
};
|