update core 完善核心游戏循环

This commit is contained in:
2024-10-26 21:50:45 +08:00
parent a5ae3c79dc
commit 6c3690c802
7 changed files with 61 additions and 90 deletions

View File

@@ -23,6 +23,8 @@ namespace Game.Component
private List<EnemyEntity> _enemyEntities;
private List<BaseProp> _baseProps;
public SuccessProp SuccessProp => this.successProp;
public float CurProgress => this._currentConditionNumber * 1f / completeConditionNumber;
public bool IsCondition => _currentConditionNumber >= completeConditionNumber;

View File

@@ -17,6 +17,7 @@ using IcecreamView;
using StateSystem;
using UniFramework.Event;
using UnityEngine;
using UnityEngine.Playables;
using Views;
using Object = UnityEngine.Object;
@@ -33,10 +34,11 @@ namespace Game
public class RoomManager : MgrBase<RoomManager>
{
private EventGroup _eventGroup;
private GameFsm _gameFsm;
private RoomGlobalData _roomGlobalData;
public bool HasLock { get ; private set; }
private EventGroup _eventGroup;
private GameFsm _gameFsm;
private RoomGlobalData _roomGlobalData;
public PlayableDirector _BossSceneDirector;
public bool HasLock { get ; private set; }
public GameState CurrentGameState => this._gameFsm.CurrentState;
@@ -109,6 +111,13 @@ namespace Game
var scenePart = AssetManager.Instance.LoadAsset<GameObject> (loadName).GetComponent<ScenePart> ();
var instantiate = Object.Instantiate (scenePart, MapContent.Instance.transform, true);
MapContent.Instance.SetPart (instantiate);
if (partIndex == 3)
{
//额外加载boss场景
var bossScene = AssetManager.Instance.LoadAsset<GameObject>("");
var gameObject = Object.Instantiate (bossScene , MapContent.Instance.ScenePart.SuccessProp.transform.position , Quaternion.identity);
this._BossSceneDirector = gameObject.GetComponent<PlayableDirector> ();
}
}
#region

View File

@@ -37,7 +37,7 @@ namespace System
{
if (stateChange == PlayModeStateChange.EnteredPlayMode)
{
// GameStateManager.Instance.Active(StateSystem.GameGlobalState.GameBegin);
GameStateManager.Instance.Active(StateSystem.GameGlobalState.GameBegin);
}
}

View File

@@ -53,7 +53,6 @@ namespace Views{
rightFragment.effectFactor = 1;
}
await UniTask.Delay (500);
UpdateAnim (index);
}
@@ -79,6 +78,7 @@ namespace Views{
else
{
//播放结尾gc动画
RoomManager.Instance._BossSceneDirector.Play();
}
});
});
@@ -152,6 +152,7 @@ namespace Views{
3 => this.bluePoint,
_ => null
};
await UniTask.Delay (500);
await AnimOpen (effects , point);
if (index >= 3)
{