添加 BgForm
This commit is contained in:
@@ -87,6 +87,9 @@ namespace Procedure
|
||||
case SceneId.Menu:
|
||||
ChangeState<ProcedureMenu>(procedureOwner);
|
||||
break;
|
||||
case SceneId.Main:
|
||||
ChangeState<ProcedureMain>(procedureOwner);
|
||||
break;
|
||||
case SceneId.GameplayA:
|
||||
ChangeState<ProcedureCombine>(procedureOwner);
|
||||
break;
|
||||
@@ -149,4 +152,4 @@ namespace Procedure
|
||||
ne.DependencyAssetName, ne.LoadedCount.ToString(), ne.TotalCount.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using GameFramework.Fsm;
|
||||
using GameFramework.Procedure;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProcedureMain : MonoBehaviour
|
||||
namespace Procedure
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
public class ProcedureMain : ProcedureBase
|
||||
{
|
||||
|
||||
}
|
||||
public override bool UseNativeDialog => false;
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
protected override void OnEnter(IFsm<IProcedureManager> procedureOwner)
|
||||
{
|
||||
base.OnEnter(procedureOwner);
|
||||
|
||||
GameEntry.Dialog.Init(1);
|
||||
GameEntry.Dialog.StartDialog(1001);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Procedure
|
||||
private SettingFormController _settingFormController;
|
||||
|
||||
private const string SettingPrefix = "Setting.";
|
||||
|
||||
|
||||
private bool _gameStarted = false;
|
||||
|
||||
private void StartGame()
|
||||
@@ -78,7 +78,7 @@ namespace Procedure
|
||||
{
|
||||
_menuFormController?.CloseUI();
|
||||
_settingFormController?.CloseUI();
|
||||
|
||||
|
||||
var e = GameEntry.Event;
|
||||
e.Unsubscribe(MenuStartEventArgs.EventId, MenuStart);
|
||||
e.Unsubscribe(MenuContinueEventArgs.EventId, MenuContinue);
|
||||
@@ -96,7 +96,7 @@ namespace Procedure
|
||||
|
||||
if (_gameStarted)
|
||||
{
|
||||
procedureOwner.SetData<VarInt32>("NextSceneId", (int)SceneId.GameplayA);
|
||||
procedureOwner.SetData<VarInt32>("NextSceneId", (int)SceneId.Main);
|
||||
ChangeState<ProcedureChangeScene>(procedureOwner);
|
||||
}
|
||||
}
|
||||
@@ -132,10 +132,10 @@ namespace Procedure
|
||||
private void SettingSave(object sender, GameEventArgs e)
|
||||
{
|
||||
if (!(e is SettingSaveEventArgs args)) return;
|
||||
|
||||
|
||||
GameEntry.Sound.SetVolume("BGM", args.GameSettings.BGMVolume);
|
||||
GameEntry.Sound.SetVolume("SE", args.GameSettings.SEVolume);
|
||||
|
||||
|
||||
ScreenResolutionType resolution = args.GameSettings.ScreenResolution;
|
||||
int width = 0, height = 0;
|
||||
switch (resolution)
|
||||
@@ -183,7 +183,7 @@ namespace Procedure
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
|
||||
if (args.GameSettings.AntiAliasing)
|
||||
{
|
||||
foreach (var asset in GraphicsSettings.allConfiguredRenderPipelines)
|
||||
@@ -201,10 +201,10 @@ namespace Procedure
|
||||
|
||||
Application.targetFrameRate = -1;
|
||||
QualitySettings.vSyncCount = args.GameSettings.VSync ? 1 : 0;
|
||||
|
||||
|
||||
GameEntry.Setting.SaveSetting(args.GameSettings);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user