Reparented Bounty Director to an Interactable Actor
This commit is contained in:
parent
17916321f2
commit
be22eae329
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:095a379c23e9c3e8d2b07f5b2036d1588931675bee26a2010492c88371620daa
|
||||
size 42288
|
||||
oid sha256:d9d96d19206de2c336790632a9774519478154bb0eedd7080b8ee8c485e15844
|
||||
size 43857
|
||||
|
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:444ddcb2a79ffd12016502dc9f588c06ea0a5e07e033556a698f2cb3249c0d58
|
||||
size 4464
|
||||
oid sha256:b37ffa979db56e7f9d07e4c0d02718fa6f15cda90cf7e41886f7301a917cfe15
|
||||
size 4934
|
||||
|
@ -119,6 +119,13 @@ void ABountyDirector::DestroyActiveSideBounties()
|
||||
UpdateBountyDisplay();
|
||||
}
|
||||
|
||||
void ABountyDirector::Interact()
|
||||
{
|
||||
Super::Interact();
|
||||
UE_LOG(LogTemp, Warning, TEXT("This is where I'll put widget opening code!!!!"));
|
||||
}
|
||||
|
||||
|
||||
// ----------- Favour Shop ---------------
|
||||
|
||||
void ABountyDirector::EarnFavours(int FavoursEarned)
|
||||
|
@ -6,11 +6,12 @@
|
||||
#include "MainBountyClass.h"
|
||||
#include "SideBountyClass.h"
|
||||
#include "EndlessVendetta/EndlessVendettaCharacter.h"
|
||||
#include "EndlessVendetta/InteractableActor.h"
|
||||
#include "GameFramework/Actor.h"
|
||||
#include "BountyDirector.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class ENDLESSVENDETTA_API ABountyDirector : public AActor
|
||||
class ENDLESSVENDETTA_API ABountyDirector : public AInteractableActor
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
@ -43,6 +44,8 @@ class ENDLESSVENDETTA_API ABountyDirector : public AActor
|
||||
// Collect reward for current Bounty and prepare for the next
|
||||
void FinishActiveBounty();
|
||||
|
||||
void Interact() override;
|
||||
|
||||
protected:
|
||||
int Favours = 0;
|
||||
// Called when the game starts or when spawned
|
||||
|
33
EndlessVendetta/Source/EndlessVendetta/InteractableActor.cpp
Normal file
33
EndlessVendetta/Source/EndlessVendetta/InteractableActor.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "InteractableActor.h"
|
||||
|
||||
// Sets default values
|
||||
AInteractableActor::AInteractableActor()
|
||||
{
|
||||
// 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;
|
||||
|
||||
}
|
||||
|
||||
// Called when the game starts or when spawned
|
||||
void AInteractableActor::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
void AInteractableActor::Tick(float DeltaTime)
|
||||
{
|
||||
Super::Tick(DeltaTime);
|
||||
|
||||
}
|
||||
|
||||
void AInteractableActor::Interact()
|
||||
{
|
||||
UE_LOG(LogTemp, Warning, TEXT("Interacted with %s"), *GetName());
|
||||
}
|
||||
|
||||
|
26
EndlessVendetta/Source/EndlessVendetta/InteractableActor.h
Normal file
26
EndlessVendetta/Source/EndlessVendetta/InteractableActor.h
Normal file
@ -0,0 +1,26 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/Actor.h"
|
||||
#include "InteractableActor.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class ENDLESSVENDETTA_API AInteractableActor : public AActor
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
protected:
|
||||
// Called when the game starts or when spawned
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
public:
|
||||
// Sets default values for this actor's properties
|
||||
AInteractableActor();
|
||||
// Called every frame
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
|
||||
virtual void Interact();
|
||||
|
||||
};
|
Loading…
Reference in New Issue
Block a user