-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added RunInEditor flag to processors that allows processors to either…
… run while the editor is running, and/or only when the game is playing.
- Loading branch information
Showing
13 changed files
with
154 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//------------------------------------------------------------------------------ | ||
// @file editorstate.cc | ||
// @copyright (C) 2024 Individual contributors, see AUTHORS file | ||
//------------------------------------------------------------------------------ | ||
#include "foundation/stdneb.h" | ||
#include "editorstate.h" | ||
namespace Game | ||
{ | ||
|
||
__ImplementSingleton(Game::EditorState); | ||
|
||
//------------------------------------------------------------------------------ | ||
/** | ||
*/ | ||
EditorState::EditorState() | ||
{ | ||
__ConstructSingleton; | ||
} | ||
|
||
//------------------------------------------------------------------------------ | ||
/** | ||
*/ | ||
EditorState::~EditorState() | ||
{ | ||
__DestructSingleton; | ||
} | ||
|
||
} // namespace Game |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#pragma once | ||
//------------------------------------------------------------------------------ | ||
/** | ||
Game::EditorState | ||
A state singleton that keeps track of the state of the level editor. | ||
@note Though the editor is an external library, we still need to keep | ||
track of the editors state from the game layer in some way, which | ||
is why this exists. | ||
@copyright | ||
(C) 2024 Individual contributors, see AUTHORS file | ||
*/ | ||
//------------------------------------------------------------------------------ | ||
#include "core/singleton.h" | ||
|
||
namespace Game | ||
{ | ||
|
||
class EditorState | ||
{ | ||
__DeclareSingleton(EditorState) | ||
public: | ||
EditorState(); | ||
~EditorState(); | ||
|
||
/// is true if the editor is running | ||
bool isRunning = false; | ||
/// is true if the editor is currently playing/simulating the game (play-in-editor) | ||
bool isPlaying = false; | ||
}; | ||
|
||
} // namespace Game |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters