Files
WizardingHub/Source/WizardingCentral/StickySlime/StickySlimeComponent.h
T
2025-02-22 01:06:04 -05:00

46 lines
1.3 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "PhysicsEngine/PhysicsConstraintComponent.h"
#include "StickySlimeComponent.generated.h"
UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class WIZARDINGCENTRAL_API UStickySlimeComponent : public UActorComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UStickySlimeComponent();
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// // Called every frame
// virtual void TickComponent(float DeltaTime, ELevelTick TickType,
// FActorComponentTickFunction* ThisTickFunction) override;
UFUNCTION(BlueprintCallable, Category="Skicky Slime")
void AttachToActor(AActor* Target);
UFUNCTION(BlueprintCallable, Category="Sticky Slime")
void ActivateIfAnchored(AActor* Target);
UFUNCTION(BlueprintCallable, BlueprintCallable, Category = "Sticky Slime")
void BreakSlime();
private:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Sticky Slime", meta=(AllowPrivateAccess="true"))
AActor* AttachedActor1;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Sticky Slime", meta=(AllowPrivateAccess="true"))
AActor* AttachedActor2;
bool bIsActivated;
};