DeskSim v2 0.1
Train simulator prototype created for Lokførerskolen
TransformWidgetComponent.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 "GameFramework/Actor.h"
8#include "TransformWidgetComponent.generated.h"
9
10
11UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
12class DESKSIMV2_API UTransformWidgetComponent : public UActorComponent
13{
14 GENERATED_BODY()
15
16public:
17 // Sets default values for this component's properties
18 UTransformWidgetComponent();
19
20protected:
21 // Called when the game starts
22 virtual void BeginPlay() override;
23
24public:
25 // Called every frame
26 virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
27
28public:
29 UStaticMeshComponent* OriginSphere;
30
31 UPROPERTY(VisibleAnywhere)
32 UStaticMeshComponent* ArrowX;
33 UPROPERTY(VisibleAnywhere)
34 UStaticMeshComponent* ArrowY;
35 UPROPERTY(VisibleAnywhere)
36 UStaticMeshComponent* ArrowZ;
37
38private:
39 bool bSelected = false;
40 EAxis::Type SelectedAxis = EAxis::None;
41};