Platformer level management
This commit is contained in:
1 parent
72070901ec
commit
1aceea1b79
94 files changed
+3656
-197
No files matched your search
@@ -18,10 +18,9 @@ namespace Code.Example.Platformer
|
||||
IPlatformerPlayerFactoryInitializedHandle,
|
||||
IDisposable
|
||||
{
|
||||
// [SerializeField] private PlatformerCanvas gameplayPlatformerCanvas;
|
||||
[SerializeField] private PlatformerFirstLevelData firstLevelData;
|
||||
|
||||
private Loading _sceneInit;
|
||||
private Container _container;
|
||||
|
||||
private void LoadingComplete()
|
||||
{
|
||||
@@ -36,33 +35,21 @@ namespace Code.Example.Platformer
|
||||
// Container
|
||||
_sceneInit = new(3, LoadingComplete);
|
||||
|
||||
// containerBuilder.RegisterValue(gameplayPlatformerCanvas);
|
||||
containerBuilder.Parent.Resolve<EventBus>().Subscribe(this);
|
||||
|
||||
containerBuilder.RegisterValue(firstLevelData);
|
||||
containerBuilder.RegisterType(typeof(PlatformerEnemyFactory), new []{typeof(IPlatformerEnemyFactory)}, Lifetime.Scoped, Resolution.Eager);
|
||||
containerBuilder.RegisterType(typeof(PlatformerPlayerFactory), new []{typeof(IPlatformerPlayerFactory)}, Lifetime.Scoped, Resolution.Eager);
|
||||
containerBuilder.OnContainerBuilt += OnContainerBuild;
|
||||
}
|
||||
private Container _container;
|
||||
private void OnContainerBuild(Container container)
|
||||
{
|
||||
// gameplayPlatformerCanvas.GameplayPlatformerCanvas.worldCamera =
|
||||
// container.Resolve<CameraStateMachineContext>().cameraLoadedData.Camera;
|
||||
|
||||
_container = container;
|
||||
_sceneInit.DoProgress();
|
||||
}
|
||||
|
||||
public void PlatformerEnemyFactoryInitialized()
|
||||
{
|
||||
_sceneInit.DoProgress();
|
||||
}
|
||||
public void PlatformerEnemyFactoryInitialized() => _sceneInit.DoProgress();
|
||||
|
||||
public void PlatformerPlayerFactoryInitialized()
|
||||
{
|
||||
_sceneInit.DoProgress();
|
||||
}
|
||||
public void PlatformerPlayerFactoryInitialized() => _sceneInit.DoProgress();
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user