Музыка есть
This commit is contained in:
1 parent
557c4c3dee
commit
346dc97fef
67 files changed
+774
-66
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Audio;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Gameplay.Player;
|
||||
using Code.Input;
|
||||
@@ -14,7 +15,7 @@ namespace Code.App.AppStates
|
||||
private PlayerHealth _playerHealth;
|
||||
private PlayerMoney _playerMoney;
|
||||
|
||||
private bool _uiLoaded, _sceneLoaded;
|
||||
private bool _uiLoaded, _sceneLoaded, _onGameplayMusicLoaded, _onActionMusicLoaded;
|
||||
|
||||
public GameplayState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
@@ -22,7 +23,7 @@ namespace Code.App.AppStates
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
_uiLoaded = _sceneLoaded = false;
|
||||
_uiLoaded = _sceneLoaded = _onActionMusicLoaded = _onGameplayMusicLoaded = false;
|
||||
|
||||
Context.UIService.LoadingScreen.Show();
|
||||
|
||||
@@ -35,12 +36,23 @@ namespace Code.App.AppStates
|
||||
|
||||
Context.UIService.SwitchPanelTo(UIPanel.Gameplay, callback: PostUILoaded);
|
||||
|
||||
Context.AudioFactory.WarmGameplayMusic(OnGameplayMusicLoaded);
|
||||
Context.AudioService.TransitToSnapshot(AudioSnapshotState.Peaceful);
|
||||
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.GiveHealth, GiveHealth);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.GiveMoney, GiveMoney);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.LooseHealth, LooseHealth);
|
||||
Context.InputService.DebugBindAction((int)ActionMappings.Debug, (int)DebugActions.LooseMoney, LooseMoney);
|
||||
}
|
||||
|
||||
private void OnGameplayMusicLoaded()
|
||||
{
|
||||
_onGameplayMusicLoaded = true;
|
||||
|
||||
// Context.AudioService.();
|
||||
|
||||
CheckIfLoaded();
|
||||
}
|
||||
private void OnSceneLoaded()
|
||||
{
|
||||
_sceneLoaded = true;
|
||||
|
||||
Reference in new issue
Block a user