DeskSim v2 0.1
Train simulator prototype created for Lokførerskolen
ClickableObjectComponent.h
1// Copyright 2022 Thomas Arinesalingam, John Ole Bjerke, Endre Heksum & Henrik Markengbakken Karlsen . All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
7#include "ClickableObjectComponent.generated.h"
8
9
10UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
11class DESKSIMV2_API UClickableObjectComponent : public UActorComponent
12{
13 GENERATED_BODY()
14
15public:
16 // Sets default values for this component's properties
17 UClickableObjectComponent();
18
19protected:
20 // Called when the game starts
21 virtual void BeginPlay() override;
22
23public:
24 // Called every frame
25 virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
26
27 bool bSelected;
28
29private:
30 UActorComponent* StaticMesh;
31
32 void OnClickedEvent();
33};