Add basic code

This commit is contained in:
2025-02-22 01:06:04 -05:00
parent 9ffe9abddb
commit d3f9f594af
6 changed files with 386 additions and 0 deletions
@@ -0,0 +1,45 @@
// 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;
};