You've already forked taptap2024_GJ_chidouren
33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using System;
|
|
using Framework.Audio;
|
|
using Framework.FSMLite;
|
|
using Framework.UI;
|
|
using Game.Component;
|
|
using Game.Data;
|
|
using Game.EventDefine;
|
|
using Views;
|
|
|
|
namespace Game.FsmNode
|
|
{
|
|
public class GameStart : StateMachine<GameState>
|
|
{
|
|
protected override async void OnEnter (params object[] args)
|
|
{
|
|
MapContent.Instance.PlayerEntity.gameObject.SetActive (false);
|
|
if (MapContent.Instance.ScenePart == null)
|
|
{
|
|
RoomManager.Instance.LoadScenePart (RoomManager.Instance.PartIndex);
|
|
}
|
|
UIManager.Instance.CloseLoading (null);
|
|
MapContent.Instance.ResetGame ();
|
|
// AudioManager.Instance.PlayBGM(BgmAudio.NormalBgm , 0.65f);
|
|
CameraManager.Instance.SetCameraState (CameraManager.CameraState.Player_Near);
|
|
GameEventDefine.ChangeGameFsm.SendMessage (GameState.FightGame , true);
|
|
}
|
|
|
|
protected override void OnExit ()
|
|
{
|
|
UIManager.Instance.CloseViewWithGroup (this.GetType ().FullName);
|
|
}
|
|
}
|
|
} |