22 virtual void BeginPlay()
override;
24 UFUNCTION(BlueprintNativeEvent, Category=
"Room")
25 bool GetShouldRoomSpawnDoor(const FRandomStream& Stream) const;
31 UFUNCTION(BlueprintCallable, Category="Room")
32 bool GetCanHaveWindow() const;
34 UFUNCTION(CallInEditor, Category="Room|Editor")
36 UFUNCTION(BlueprintCallable, Category="Room|Random")
37 FRandomStream GetRandomStream()
const {
return RandomStream;};
38 UFUNCTION(BlueprintCallable, Category=
"Room|Random")
39 bool GetIsRandomStreamSet()
const {
return bRandomStreamSet;};
41 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=
"Room|General")
45 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Room|Doors")
46 bool bShouldDoorSpawn = true;
48 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Room|Doors", meta=(EditCondition="bShouldDoorSpawn"))
49 bool bRandomDoorSpawn = false;
51 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Room|Doors", meta=(EditCondition="bRandomDoorSpawn", ClampMin=0.0f, ClampMax=1.0f))
52 float RandomWeight = 0.5f;
54 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Room|Windows")
55 bool bCheckForWindow = false;
57 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Room|Windows")
58 float WindowTraceDistance = 2000.0f;
64 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
65 USceneComponent* DefaultRootComponent;
66 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
67 USceneComponent* ExitsRootComponent;
68 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
69 USceneComponent* OverlapsRootComponent;
71 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
72 USceneComponent* AISpawnsRootComponent;
73 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
74 USceneComponent* WeaponSpawnsRootComponent;
75 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
76 USceneComponent* LootSpawnsRootComponent;
79 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
80 USceneComponent* DoorsRootComponent;
82 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
83 USceneComponent* LightsRootComponent;
84 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
85 USceneComponent* GeometryRootComponent;
86 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
87 USceneComponent* WallsRootComponent;
88 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
89 USceneComponent* RoofRootComponent;
90 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
91 USceneComponent* FloorRootComponent;
93 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
94 USceneComponent* DecorationsRootComponent;
96 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
97 USceneComponent* PropsRootComponent;
99 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Component")
100 UBoxComponent* BoundsComponent;
129 virtual USceneComponent* GetExitsRootComponent()
const override {
return ExitsRootComponent;};
135 virtual int32 GetNumOfExits()
const override;
137 virtual FBox GetRoomBounds()
const override;
141 virtual void AddAttachedRoom(AActor* Actor)
override;
142 virtual void ToggleAllRoomRoofs(
const bool bForceHide)
override;
145 virtual void SetRandomStream(
const FRandomStream& Stream)
override;
147 virtual void SetDynamicMaterial(UMaterialInterface* Material)
override;
152 virtual void SetActive(
const bool bActive)
override;
159 virtual void SetOptimizationLevel(
const int32
Level)
override;
160 UFUNCTION(BlueprintImplementableEvent, Category=
"Optimization")
161 void OnOptimizationLevelChanged(const int32
Level, const int32 PreviousLevel);
162 UFUNCTION(BlueprintCallable, Category="Room|Optimization")
163 int32 GetOptimizationLevel()
const {
return OptimizationLevel;}
165 virtual void SetReady()
override;
166 UFUNCTION(BlueprintImplementableEvent, Category=
"Room")
168 UFUNCTION(BlueprintCallable, Category="Room")
169 bool GetIsRoomReady()
const {
return bReady;};
172 virtual void Activate();
173 virtual void Deactivate();
175 UFUNCTION(BlueprintCallable, Category=
"Room|Optimization")
176 void ToggleLights(const
bool bTurnOn) const;
177 UFUNCTION(BlueprintCallable, Category="Room|Optimization")
178 void TogglePhysicsObjects(const
bool bSimulatePhysics, const
bool bVisible) const;
179 UFUNCTION(BlueprintCallable, Category="Room|Optimization")
180 void TogglePhysicsObjectsSimulation(const
bool bSimulatePhysics) const;
181 UFUNCTION(BlueprintCallable, Category="Room|Optimization")
182 void TogglePhysicsObjectsVisibility(const
bool bVisible) const;
183 UFUNCTION(BlueprintCallable, Category="Room|Optimization")
184 void ToggleGeometry(const
bool bVisible) const;
185 UFUNCTION(BlueprintCallable, Category="Room|Optimization")
186 void ToggleDecorations(const
bool bVisible) const;
190 UFUNCTION(BlueprintCallable, Category="Room")
191 bool GetCanBeWindow(UStaticMeshComponent* WallMesh) const;
194 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Room|
Debug")
195 bool bDebuggingMode = false;
199 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Connections")
202 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Room|Doors")
203 TArray<AActor*> DoorActors;
207 void GetLightComponents();
208 void GetPropComponents();
210 UPROPERTY(VisibleAnywhere, Category="Room|
General")
213 UPROPERTY(VisibleAnywhere, Category="Room|Random")
214 bool bRandomStreamSet = false;
215 UPROPERTY(VisibleAnywhere, Category="Room|Random")
216 FRandomStream RandomStream;
217 UPROPERTY(VisibleAnywhere, Category="Room|Random")
220 UPROPERTY(VisibleAnywhere, Category="Room|
Debug")
221 bool bShouldHideRoof = false;
222 UPROPERTY(VisibleAnywhere, Category="Room|Optimization")
223 int32 OptimizationLevel = 0;
224 UPROPERTY(VisibleAnywhere, Category="Room|Optimization")
225 int32 PreviousOptimizationLevel = 0;
228 UPROPERTY(VisibleAnywhere, Category="Room|Lights")
229 TArray<ULightComponent*> Lights;
230 UPROPERTY(VisibleAnywhere, Category="Room|Props")
231 TArray<UStaticMeshComponent*> Props;