Space Plunder
Loading...
Searching...
No Matches
Gate.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Gate.generated.h"
7
8
9USTRUCT(BlueprintType)
10struct FGate
11{
12 GENERATED_BODY()
13
14 FORCEINLINE FGate();
15 explicit FORCEINLINE FGate(bool bStartClosed);
16
17 FORCEINLINE void Open(){bGateOpen = true;}
18 FORCEINLINE void Close(){bGateOpen = false;}
19 FORCEINLINE void Toggle(){bGateOpen = !bGateOpen;}
20
21 FORCEINLINE bool IsOpen() const {return bGateOpen;}
22
23private:
24 UPROPERTY(VisibleAnywhere)
25 bool bGateOpen;
26
27};
28
29FORCEINLINE FGate::FGate() : bGateOpen(false)
30{
31
32}
33
34FORCEINLINE FGate::FGate(const bool bStartClosed) : bGateOpen(!bStartClosed)
35{
36
37}
Definition Gate.h:11
FORCEINLINE bool IsOpen() const
Definition Gate.h:21
FORCEINLINE FGate()
Definition Gate.h:29
FORCEINLINE void Open()
Definition Gate.h:17
FORCEINLINE void Close()
Definition Gate.h:18
FORCEINLINE void Toggle()
Definition Gate.h:19