Space Plunder
Loading...
Searching...
No Matches
AGravityRoom Class Reference

#include <GravityRoom.h>

Inheritance diagram for AGravityRoom:
ARoomWithDoorsActor ABaseRoomActor AActorBase IBaseInterface ISaveLoad

Public Member Functions

 AGravityRoom ()
 
virtual void Tick (float DeltaTime) override
 
- Public Member Functions inherited from ARoomWithDoorsActor
 ARoomWithDoorsActor ()
 
int32 GetNumOfDoors () const
 
bool GetAllDoorsLocked () const
 
bool GetAllDoorsUnlocked () const
 
void SetAllDoorsLocked (const bool bLocked)
 
void OnSetAllDoorsLocked (const bool bLocked)
 
- Public Member Functions inherited from ABaseRoomActor
 ABaseRoomActor ()
 
void SetPhysicsObjectsActive (const bool bActive)
 
void OnSetPhysicsObjectsActive (const bool bActive)
 
void SetRoomGravity (const bool bOn)
 
void OnSetRoomGravity (const bool bOn)
 
- Public Member Functions inherited from AActorBase
 AActorBase ()
 
virtual bool SaveGame () override
 
virtual bool LoadGame () override
 
void SetGravityEnabledEvent (const bool bValue)
 

Protected Member Functions

virtual void BeginPlay () override
 
- Protected Member Functions inherited from ARoomWithDoorsActor
void DoorOpened (const int32 Index, const bool bOpened)
 
void OnDoorOpened (const int32 Index, const bool bOpened)
 
- Protected Member Functions inherited from AActorBase
void LogDebugError (const FString &Message) const
 
void LogDebugError (const FString &Message, const int32 Value) const
 
void LogDebugError (const FString &Message, const float Value) const
 
void LogDebugWarning (const FString &Message) const
 
void LogDebugWarning (const FString &Message, const int32 Value) const
 
void LogDebugWarning (const FString &Message, const float Value) const
 
void LogDebugMessage (const FString &Message, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const int32 Value, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const float Value, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const bool bValue, const bool bWarning, const bool bError) const
 
void LogOnScreenMessage (const int32 Key, const FString &Message, FColor Color=FColor::Green) const
 
void SetCategoryName (const FLogCategoryBase &Category)
 

Protected Attributes

TObjectPtr< UBoxComponent > BoxComponent
 
TObjectPtr< UGravityComponent > GravityComponent
 
- Protected Attributes inherited from ARoomWithDoorsActor
TArray< AOpenableDoorActor * > DoorActors
 
TArray< AActor * > ConnectingRooms
 
- Protected Attributes inherited from ABaseRoomActor
class USceneComponent * SceneComponent
 
class USceneComponent * WallsRootComponent
 
class USceneComponent * FloorRootComponent
 
class USceneComponent * CeilingRootComponent
 
TArray< AActor * > AllPhysicsObjects
 
TArray< UStaticMeshComponent * > AllWallMeshes
 
TArray< UStaticMeshComponent * > AllFloorMeshes
 
TArray< UStaticMeshComponent * > AllCeilingMeshes
 
TArray< UPointLightComponent * > AllPointLights
 
- Protected Attributes inherited from AActorBase
FString DisplayName = "Display Name"
 
bool bDebuggingMode = false
 

Constructor & Destructor Documentation

◆ AGravityRoom()

AGravityRoom::AGravityRoom ( )
24{
25 PrimaryActorTick.bCanEverTick = true;
26 PrimaryActorTick.bStartWithTickEnabled = false;
27
28 BoxComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("Box Collision"));
29 BoxComponent->SetupAttachment(RootComponent);
30
31 GravityComponent = CreateDefaultSubobject<UGravityComponent>(TEXT("Gravity Component"));
32 GravityComponent->AddShapeComponent(BoxComponent);
33
34#if WITH_EDITOR
35 bDebuggingMode = true;
36#endif
37
38#if WITH_EDITORONLY_DATA
39 // Create and configure attached text render component
40 TextRenderComponent = CreateEditorOnlyDefaultSubobject<UTextRenderComponent>(TextRenderComponentName);
41 if (!IsRunningCommandlet() && TextRenderComponent != nullptr)
42 {
43 TextRenderComponent->bHiddenInGame = true;
44 TextRenderComponent->HorizontalAlignment = EHorizTextAligment::EHTA_Center;
45 TextRenderComponent->Text = FText::AsCultureInvariant(TEXT("Gravity Room"));
46 TextRenderComponent->SetupAttachment(BoxComponent);
47 }
48
49 PreviewIcon = CreateEditorOnlyDefaultSubobject<UBillboardComponent>(PreviewIconComponentName);
50 if (!IsRunningCommandlet() && PreviewIcon != nullptr)
51 {
52 PreviewIcon->bHiddenInGame = true;
53 PreviewIcon->SetupAttachment(BoxComponent);
54 }
55#endif // WITH_EDITORONLY_DATA
56}
bool bDebuggingMode
Definition ActorBase.h:53
TObjectPtr< UBoxComponent > BoxComponent
Definition GravityRoom.h:44
TObjectPtr< UGravityComponent > GravityComponent
Definition GravityRoom.h:46

Member Function Documentation

◆ BeginPlay()

void AGravityRoom::BeginPlay ( )
overrideprotectedvirtual

Reimplemented from ARoomWithDoorsActor.

59{
60 Super::BeginPlay();
61}

◆ Tick()

void AGravityRoom::Tick ( float DeltaTime)
overridevirtual
65{
66 Super::Tick(DeltaTime);
67}

Member Data Documentation

◆ BoxComponent

TObjectPtr<UBoxComponent> AGravityRoom::BoxComponent
protected

◆ GravityComponent

TObjectPtr<UGravityComponent> AGravityRoom::GravityComponent
protected

The documentation for this class was generated from the following files: