Add getModuleManager() to Game
This commit is contained in:
@@ -12,6 +12,7 @@ class Game
|
||||
private $entityManager;
|
||||
private $eventManager;
|
||||
private $composerManager;
|
||||
private $moduleManager;
|
||||
|
||||
public function __construct(
|
||||
EntityManagerInterface $entityManager,
|
||||
@@ -21,6 +22,18 @@ class Game
|
||||
$this->eventManager = $eventManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the game's module manager.
|
||||
* @return ModuleManager The game's module manager.
|
||||
*/
|
||||
public function getModuleManager(): ModuleManager
|
||||
{
|
||||
if ($this->moduleManager === null) {
|
||||
$this->moduleManager = new ModuleManager($this);
|
||||
}
|
||||
return $this->moduleManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the game's composer manager.
|
||||
* @return ComposerManager The game's composer manager.
|
||||
|
||||
Reference in New Issue
Block a user