Skip to content

Commit

Permalink
[Add] Hazards inheritance + Reparent Campfire blueprint with the new …
Browse files Browse the repository at this point in the history
…scripts
  • Loading branch information
iJotape4 committed Oct 20, 2024
1 parent 123c0ce commit 4a5a0c4
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 0 deletions.
Binary file added BP_Pics/Hazards/CampfireDetails.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Fill out your copyright notice in the Description page of Project Settings.


#include "Hazards/HazardBase.h"

// Sets default values
AHazardBase::AHazardBase()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
CollisionBox = CreateDefaultSubobject<UBoxComponent>(TEXT("CollisionBox"));
}

// Called when the game starts or when spawned
void AHazardBase::BeginPlay()
{
Super::BeginPlay();

}

// Called every frame
void AHazardBase::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.


#include "Hazards/HazardCampfire.h"

31 changes: 31 additions & 0 deletions GameJamPlus2024/Source/GameJamPlus2024/Public/Hazards/HazardBase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Components/BoxComponent.h"
#include "GameFramework/Actor.h"
#include "HazardBase.generated.h"

UCLASS()
class GAMEJAMPLUS2024_API AHazardBase : public AActor
{
GENERATED_BODY()

public:
// Sets default values for this actor's properties
AHazardBase();

protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Upgrades", meta = (AllowPrivate))
UBoxComponent* CollisionBox;


public:
// Called every frame
virtual void Tick(float DeltaTime) override;

};
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Hazards/HazardBase.h"
#include "HazardCampfire.generated.h"

/**
*
*/
UCLASS()
class GAMEJAMPLUS2024_API AHazardCampfire : public AHazardBase
{
GENERATED_BODY()

};

0 comments on commit 4a5a0c4

Please sign in to comment.