A singleton manager for a single-stream, out of the box implementation of the Command pattern. Once you understand how the package works it is highly recommended create your own CommandStream wrapper tailored to the needs of your project. Executes the next command in the CommandStream every frame.
More...
|
int | maximumHistoryDepth = -1 |
| The value that will be used in the internal CommandStream's constructor, set to negative to record all history
|
|
|
static SingletonCommandManager | Instance [get] |
| The singleton instance of the CommandManger.
|
|
int | HistoryCount [get] |
| The number of Commands recorded by the CommandManager's CommandStream
|
|
float | HistoryDepth [get] |
| The depth to which the CommandManager's CommandStream records its history
|
|
int | QueueCount [get] |
| The Number of commands queued in the CommandManager's CommandStream
|
|
bool | QueueEmpty [get] |
| Wether or not the CommandManger's CommandStream has an empty queue
|
|
A singleton manager for a single-stream, out of the box implementation of the Command pattern. Once you understand how the package works it is highly recommended create your own CommandStream wrapper tailored to the needs of your project. Executes the next command in the CommandStream every frame.
◆ CancelRunningCommandTask() [1/2]
void SadSapphicGames.CommandPattern.SingletonCommandManager.CancelRunningCommandTask |
( |
IAsyncCommand |
asyncCommand | ) |
|
Cancels an AsyncCommand's running task through a reference to the command
- Parameters
-
◆ CancelRunningCommandTask() [2/2]
void SadSapphicGames.CommandPattern.SingletonCommandManager.CancelRunningCommandTask |
( |
Task |
taskToCancel | ) |
|
Cancels an AsyncCommand's running task through a reference to the task
- Parameters
-
◆ DropCommandHistory()
ReadOnlyCollection< ICommand > SadSapphicGames.CommandPattern.SingletonCommandManager.DropCommandHistory |
( |
| ) |
|
Empties the history of the internal CommandStream and replaces it with an empty one.
- Returns
- The old history of the internal CommandStream
◆ ForceQueueUndoCommand()
void SadSapphicGames.CommandPattern.SingletonCommandManager.ForceQueueUndoCommand |
( |
IUndoable |
commandToUndo | ) |
|
◆ GetCommandHistory()
ReadOnlyCollection< ICommand > SadSapphicGames.CommandPattern.SingletonCommandManager.GetCommandHistory |
( |
| ) |
|
Get the underlying CommandStream's history
- Returns
- A ReadOnlyCollection of all the commands executed by the CommandManager's CommandStream
◆ GetRunningCommandTasks()
ReadOnlyCollection< Task > SadSapphicGames.CommandPattern.SingletonCommandManager.GetRunningCommandTasks |
( |
| ) |
|
Get the currently uncompleted tasks from executed AsyncCommands
- Returns
- A ReadOnlyCollection of uncompleted tasks from executed AsyncCommands
◆ QueueCommand()
void SadSapphicGames.CommandPattern.SingletonCommandManager.QueueCommand |
( |
ICommand |
command | ) |
|
◆ QueueCommands()
void SadSapphicGames.CommandPattern.SingletonCommandManager.QueueCommands |
( |
IEnumerable< ICommand > |
commands | ) |
|
Queue's multiple commands into the CommandManager's CommandStream
- Parameters
-
commands | The collection of commands to be Queued |
◆ ToggleCommandExecution()
void SadSapphicGames.CommandPattern.SingletonCommandManager.ToggleCommandExecution |
( |
bool |
onoff | ) |
|
Turns command execution on or off
- Parameters
-
onoff | if false stops the execution of commands, if true enables it |
◆ TryQueueUndoCommand()
bool SadSapphicGames.CommandPattern.SingletonCommandManager.TryQueueUndoCommand |
( |
IUndoable |
commandToUndo | ) |
|
Queue the undo-command of a Command implementing IUndoable into the CommandStream
- Parameters
-
- Returns
- Wether the undo command was allowed to be queued
The documentation for this class was generated from the following file:
- C:/Users/Layla/Documents/My Docs/GameDev/CommandPatternDevelopment/Assets/Packages/CommandPattern/Runtime/Monobehaviours/SingletonCommandManager.cs