update core

This commit is contained in:
2024-10-24 22:16:39 +08:00
parent 249705c952
commit 2181e42066
9 changed files with 1042 additions and 12471 deletions

View File

@@ -36,7 +36,6 @@ namespace Game
private EventGroup _eventGroup;
private GameFsm _gameFsm;
private RoomGlobalData _roomGlobalData;
public bool HasGaming { get; private set; }
public bool HasLock { get ; private set; }
public GameState CurrentGameState => this._gameFsm.CurrentState;
@@ -77,9 +76,6 @@ namespace Game
{
}
#endif
if (HasGaming)
{
}
}

View File

@@ -46,7 +46,7 @@ Material:
m_Ints: []
m_Floats:
- Vector1_c9f2135c9d254951b22c018d295f8558: 0.003
- _blurOffset: 0.064
- _blurOffset: 0.059033036
m_Colors: []
m_BuildTextureStacks: []
--- !u!114 &268278646524644520

View File

@@ -1,14 +1,18 @@
using System;
using System.StateSystem;
using Framework.Asset;
using Framework.Audio;
using Framework.FSMLite;
using Framework.Timer;
using Framework.UI;
using IcecreamView;
using StateSystem.Loader;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.SceneManagement;
using Views;
using AudioType = Framework.Audio.AudioType;
using Object = UnityEngine.Object;
namespace StateSystem.State
{
@@ -16,47 +20,29 @@ namespace StateSystem.State
{
private SceneLoader _loader;
public int _lastCatLevel = -1; //记录上一次的猫的等级,用于判断是否升级
public int _lastCatLevel = -1; //记录上一次的猫的等级,用于判断是否升级
private GameObject homeScene;
protected override async void OnEnter (params object[] args)
{
AudioManager.Instance.PlayBGM (BgmAudio.LobbyBgm);
GameUpdateMgr.Instance.AddUpdater (DoUpdate);
// var activeScene = SceneManager.GetActiveScene ();
// if (activeScene.name != SceneName.MainScene.ToString ())
// {
// Debug.Log ("进入Home开始加载场景" + SceneName.MainScene.ToString ());
// this._loader = new SceneLoader (SceneName.MainScene);
// this._loader.BeginLoad (OnLoading, OnActived);
// }
// else
// {
// OnActived ();
// }
OnActived ();
}
private void OnLoading (float obj)
{
Debug.Log ("加载进度: " + obj);
if (obj >= 1)
{
// Debug.Log("加载完成");
this._loader.Active ();
}
}
private void OnActived ()
{
UIManager.Instance.OpenView (UIPanel.HomePanel);
var homePart = AssetManager.Instance.LoadAlwaysAsset<GameObject> ("HomeScene.prefab");
homeScene = Object.Instantiate (homePart);
UIManager.Instance.OpenView (UIPanel.HomePanel , new IC_ViewData (this.homeScene.GetComponent<PlayableDirector> ()));
UIManager.Instance.CloseLoading (null);
}
protected override void OnExit ()
{
GameObject.Destroy (this.homeScene.gameObject);
GameUpdateMgr.Instance.RemoveUpdater (DoUpdate);
// this._loader.Kill ();
}

View File

@@ -1,11 +1,14 @@
using System.Collections.Generic;
using System.StateSystem;
using Framework.UI;
using Game;
using Game.Component;
using UnityEngine;
using UnityEngine.UI;
using IcecreamView;
using Script.Core.Utils.Extend;
using StateSystem;
using UnityEngine.Playables;
namespace Views{
@@ -14,12 +17,14 @@ namespace Views{
public Button _toGame;
public Button _settingGame;
public Button _aboutGame;
private PlayableDirector _playableDirector;
public override void OnOpenView(IC_ViewData parameters)
{
this._playableDirector = parameters.GetValue<PlayableDirector>();
MapContent.Instance.Pathfinder.Scan ();
MapContent.Instance.IsActiveGame = true;
}
public override void OnCloseView()
@@ -62,15 +67,24 @@ namespace Views{
private void OnClickToGame()
{
// UIManager.Instance.OpenView (UIPanel.SuccessPanel);
// return;
this._toGame.gameObject.SetActive(false);
this._aboutGame.gameObject.SetActive(false);
this._settingGame.gameObject.SetActive(false);
this._playableDirector.stopped += ToGaming;
this._playableDirector.initialTime = 0;
this._playableDirector.Play ();
}
private void ToGaming (PlayableDirector playableDirector)
{
UIManager.Instance.OpenLoading (() =>
{
this.ViewConnector.CloseView ();
GameStateManager.Instance.OpenState (GameGlobalState.GameRoom);
});
}
private void OnClickSettingGame()
{
UIManager.Instance.OpenView (UIPanel.SettingPanel);