init: add project

This commit is contained in:
Bragin Stepan
2026-02-18 23:02:28 +05:00
commit 4f01e66894
620 changed files with 52253 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
using Assets._Project.Develop.Runtime.Infrastructure;
using Assets._Project.Develop.Runtime.Infrastructure.DI;
using Assets._Project.Develop.Runtime.Utilities.SceneManagement;
using System;
using System.Collections;
using _Project.Develop.Runtime.Entities;
using _Project.Develop.Runtime.Logic.Gameplay.Features;
using _Project.Develop.Runtime.Utilities.InputManagement;
using UnityEngine;
namespace Assets._Project.Develop.Runtime.Gameplay.Infrastructure
{
public class GameplayBootstrap : SceneBootstrap
{
[SerializeField] private TestGameplay _testGameplay;
private DIContainer _container;
private EntitiesLifeContext _entitiesLifeContext;
private GameplayInputArgs _gameplayArgs;
private IPlayerInputService _playerInput;
public override void ProcessRegistrations(DIContainer container, IInputSceneArgs sceneArgs = null)
{
_container = container;
if (sceneArgs is not GameplayInputArgs gameplayInputArgs)
throw new ArgumentException($"{nameof(sceneArgs)} is not match with {typeof(GameplayInputArgs)} type");
GameplayContextRegistrations.Process(_container);
_gameplayArgs = gameplayInputArgs;
}
public override IEnumerator Initialize()
{
_entitiesLifeContext = _container.Resolve<EntitiesLifeContext>();
_testGameplay.Initialize(_container);
yield break;
}
public override void Run()
{
_testGameplay.Run();
}
private void Update()
{
_entitiesLifeContext?.Update(Time.deltaTime);
}
}
}