Space Plunder
Loading...
Searching...
No Matches
DoOnce.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 "DoOnce.generated.h"
7
8
USTRUCT(BlueprintType)
9
struct
FDoOnce
10
{
11
GENERATED_BODY()
12
13
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
14
bool bDoOnce = false;
15
16
FORCEINLINE
FDoOnce
();
17
explicit FORCEINLINE
FDoOnce
(
bool
bStartClosed);
18
19
FORCEINLINE
void
Reset(){bDoOnce =
true
;}
20
FORCEINLINE
bool
Execute
()
21
{
22
if
(bDoOnce)
23
{
24
bDoOnce =
false
;
25
return
true
;
26
}
27
return
false
;
28
}
29
};
30
31
FORCEINLINE
FDoOnce::FDoOnce
() : bDoOnce(false)
32
{
33
34
}
35
36
FORCEINLINE
FDoOnce::FDoOnce
(
const
bool
bStartClosed) : bDoOnce(!bStartClosed)
37
{
38
39
}
FDoOnce
Definition
DoOnce.h:10
FDoOnce::Execute
FORCEINLINE bool Execute()
Definition
DoOnce.h:20
FDoOnce::FDoOnce
FORCEINLINE FDoOnce()
Definition
DoOnce.h:31
SpaceAdventure
Plugins
BaseHelpers
Source
BaseHelpers
Public
Helpers
DoOnce.h
Generated by
1.10.0