Мусор -
This commit is contained in:
1 parent
e67fea2051
commit
3020140360
2 files changed
-114
No files matched your search
@@ -24,16 +24,12 @@ namespace Code.App.AppStates
|
|||||||
private PlayerHealth _playerHealth;
|
private PlayerHealth _playerHealth;
|
||||||
private PlayerMoney _playerMoney;
|
private PlayerMoney _playerMoney;
|
||||||
|
|
||||||
private bool _uiLoaded, _sceneLoaded, _onGameplayMusicLoaded, _onSFXLoaded;
|
|
||||||
|
|
||||||
public GameplayState(AppStateMachineContext context) : base(context)
|
public GameplayState(AppStateMachineContext context) : base(context)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void EnterState()
|
public override void EnterState()
|
||||||
{
|
{
|
||||||
_uiLoaded = _sceneLoaded = _onGameplayMusicLoaded = _onSFXLoaded = false;
|
|
||||||
|
|
||||||
Context.UIService.LoadingScreen.Show();
|
Context.UIService.LoadingScreen.Show();
|
||||||
|
|
||||||
_playerMoney = Context.PlayerFactory.CreatePlayerMoney();
|
_playerMoney = Context.PlayerFactory.CreatePlayerMoney();
|
||||||
@@ -41,14 +37,6 @@ namespace Code.App.AppStates
|
|||||||
|
|
||||||
_playerHealth.OnDeath += EndGame;
|
_playerHealth.OnDeath += EndGame;
|
||||||
|
|
||||||
// TODO
|
|
||||||
// Context.SceneLoaderService.LoadSceneAsync((int)SceneIds.MovementDev, callBack: OnSceneLoaded); // TODO Фабрика игрока Nada
|
|
||||||
|
|
||||||
// Context.UIService.SwitchPanelTo(UIPanel.Gameplay, callback: PostUILoaded);
|
|
||||||
|
|
||||||
// Context.AudioFactory.WarmGameplayMusic(OnGameplayMusicLoaded);
|
|
||||||
// Context.AudioFactory.WarmSFX(OnSFXLoaded);
|
|
||||||
// TODO
|
|
||||||
Context.AudioService.TransitToSnapshot(AudioSnapshotState.Peaceful);
|
Context.AudioService.TransitToSnapshot(AudioSnapshotState.Peaceful);
|
||||||
|
|
||||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.Debug1, GiveHealth);
|
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.Debug1, GiveHealth);
|
||||||
@@ -84,53 +72,6 @@ namespace Code.App.AppStates
|
|||||||
|
|
||||||
Context.UIService.LoadingScreen.Hide();
|
Context.UIService.LoadingScreen.Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void OnGameplayMusicLoaded()
|
|
||||||
// {
|
|
||||||
// _onGameplayMusicLoaded = true;
|
|
||||||
//
|
|
||||||
// Context.AudioService.PlayRandomPeacefulMusicUntilHumanityWillBeDestroyedForTheySins();
|
|
||||||
// Context.AudioService.PlayRandomActionMusicUntilHumanityWillBeDestroyedForTheySins();
|
|
||||||
//
|
|
||||||
// CheckIfLoaded();
|
|
||||||
// }
|
|
||||||
// private void OnSFXLoaded()
|
|
||||||
// {
|
|
||||||
// _onSFXLoaded = true;
|
|
||||||
//
|
|
||||||
// CheckIfLoaded();
|
|
||||||
// }
|
|
||||||
// private void OnSceneLoaded()
|
|
||||||
// {
|
|
||||||
// _sceneLoaded = true;
|
|
||||||
//
|
|
||||||
// var sceneEnvironment = ((GameplaySceneEnvironment)SceneManager.GetActiveScene()
|
|
||||||
// .GetSceneContainer().Resolve<CurrentSceneEnvironment>());
|
|
||||||
//
|
|
||||||
// _testSFXTransform = sceneEnvironment.debugSfxTarget;
|
|
||||||
//
|
|
||||||
// CheckIfLoaded();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private void PostUILoaded()
|
|
||||||
// {
|
|
||||||
// ((GameplayPanel)Context.UIService.CurrentPanel).Initialize(_playerMoney, _playerHealth);
|
|
||||||
// _uiLoaded = true;
|
|
||||||
// CheckIfLoaded();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private void CheckIfLoaded()
|
|
||||||
// {
|
|
||||||
// if(!_uiLoaded || !_sceneLoaded || !_onGameplayMusicLoaded || !_onSFXLoaded) return;
|
|
||||||
//
|
|
||||||
// Context.UIService.LoadingScreen.Hide();
|
|
||||||
//
|
|
||||||
// Context.CameraStateMachine.SwitchState(CameraMode.FirstPerson);
|
|
||||||
// Context.InputService.EnableMap(ActionMappings.Gameplay);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// DEBUG
|
|
||||||
|
|
||||||
private void PlayDebugSFX(InputAction.CallbackContext context)
|
private void PlayDebugSFX(InputAction.CallbackContext context)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,22 +16,13 @@ namespace Code.App.AppStates
|
|||||||
{
|
{
|
||||||
public class MainMenuState : BaseState<AppStateMachineContext>
|
public class MainMenuState : BaseState<AppStateMachineContext>
|
||||||
{
|
{
|
||||||
// private bool _uiLoaded, _sceneLoaded, _menuMusicLoaded;
|
|
||||||
public MainMenuState(AppStateMachineContext context) : base(context)
|
public MainMenuState(AppStateMachineContext context) : base(context)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void EnterState()
|
public override void EnterState()
|
||||||
{
|
{
|
||||||
// _uiLoaded = _sceneLoaded = _menuMusicLoaded = false;
|
|
||||||
|
|
||||||
Context.UIService.LoadingScreen.Show();
|
Context.UIService.LoadingScreen.Show();
|
||||||
|
|
||||||
// Context.SceneLoaderService.LoadSceneAsync((int)SceneIds.MainMenu);
|
|
||||||
//
|
|
||||||
// Context.UIService.SwitchPanelTo(UIPanel.MainMenu, PostUILoaded);
|
|
||||||
//
|
|
||||||
// Context.AudioFactory.WarmMenuMusic(MenuMusicLoaded);
|
|
||||||
|
|
||||||
Context.CameraStateMachine.SwitchState(CameraMode.Static);
|
Context.CameraStateMachine.SwitchState(CameraMode.Static);
|
||||||
|
|
||||||
@@ -65,52 +56,6 @@ namespace Code.App.AppStates
|
|||||||
Context.InputService.EnableMap(ActionMappings.MainMenu);
|
Context.InputService.EnableMap(ActionMappings.MainMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void MenuMusicLoaded()
|
|
||||||
// {
|
|
||||||
// _menuMusicLoaded = true;
|
|
||||||
//
|
|
||||||
// Context.AudioService.TransitToSnapshot(AudioSnapshotState.Peaceful);
|
|
||||||
// Context.AudioService.PlayRandomMenuMusicUntilHumanityWillBeDestroyedForTheySins();
|
|
||||||
//
|
|
||||||
// CheckIfLoaded();
|
|
||||||
// }
|
|
||||||
// private void PostUILoaded()
|
|
||||||
// {
|
|
||||||
// ((MainMenuPanel)Context.UIService.CurrentPanel).startButton.onClick.AddListener(StartGame);
|
|
||||||
// ((MainMenuPanel)Context.UIService.CurrentPanel).exitButton.onClick.AddListener(ExitGame);
|
|
||||||
//
|
|
||||||
// _uiLoaded = true;
|
|
||||||
//
|
|
||||||
// CheckIfLoaded();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private void SceneLoaded()
|
|
||||||
// {
|
|
||||||
// var hui = ((MainMenuEnvironment)SceneManager.GetActiveScene()
|
|
||||||
// .GetSceneContainer().Resolve<CurrentSceneEnvironment>());
|
|
||||||
//
|
|
||||||
// ((StaticState)Context.CameraStateMachine.CurrentBaseState).LookTarget =
|
|
||||||
// hui.cameraTarget;
|
|
||||||
//
|
|
||||||
// ((BaseCameraState)Context.CameraStateMachine.CurrentBaseState).SetFollowTransform(hui.cameraPosition);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// _sceneLoaded = true;
|
|
||||||
//
|
|
||||||
// CheckIfLoaded();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private void CheckIfLoaded()
|
|
||||||
// {
|
|
||||||
// if(!_uiLoaded || !_sceneLoaded || !_menuMusicLoaded) return;
|
|
||||||
//
|
|
||||||
// Context.UIService.LoadingScreen.Hide();
|
|
||||||
//
|
|
||||||
// Context.InputService.EnableMap(ActionMappings.MainMenu);
|
|
||||||
//
|
|
||||||
// base.EnterState();
|
|
||||||
// }
|
|
||||||
|
|
||||||
public override void Tick()
|
public override void Tick()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user