| | |
| | | |
| | | public int FuncLineID = 0; |
| | | |
| | | public float speedRatio = 1.1f; |
| | | |
| | | public JsonData extendData; |
| | | |
| | | public bool IsBattleFinish |
| | |
| | | battleTweenMgr = new BattleTweenMgr(); |
| | | recordPlayer = new RecordPlayer(); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | public virtual void Init(int _MapID, int _FuncLineID, JsonData _extendData, |
| | |
| | | battleEffectMgr.Init(this); |
| | | battleTweenMgr.Init(this); |
| | | recordPlayer.Init(this); |
| | | |
| | | |
| | | if (blueTeamList == null) |
| | | { |
| | | battleObjMgr.Init(this, redTeamList[redTeamIndex], null); |
| | |
| | | battleObjMgr.Init(this, redTeamList[redTeamIndex], blueTeamList[blueTeamIndex]); |
| | | } |
| | | |
| | | battleRootNode.SetBackground(ResManager.Instance.LoadAsset<Texture>("Texture/FullScreenBg", "battlebg1")); |
| | | battleRootNode.SetBackground(ResManager.Instance.LoadAsset<Texture>("Texture/FullScreenBg", "mainui_img_277")); |
| | | |
| | | SetBattleStartState(); |
| | | SetSpeedRatio(speedRatio); |
| | | } |
| | | |
| | | public void SetSpeedRatio(float ratio) |
| | | { |
| | | speedRatio = ratio; |
| | | battleObjMgr.SetSpeedRatio(ratio); |
| | | recordPlayer.SetSpeedRatio(ratio); |
| | | battleEffectMgr.SetSpeedRatio(ratio); |
| | | battleTweenMgr.SetSpeedRatio(ratio); |
| | | } |
| | | |
| | | protected virtual void SetBattleStartState() |
| | | { |
| | | foreach (var obj in battleObjMgr.allBattleObjDict.Values) |
| | | { |
| | | obj.layerMgr.SetFront(); |
| | | } |
| | | |
| | | battleRootNode.skillMaskNode.SetActive(false); |
| | | } |
| | | |
| | | // 在Run之前要设置完毕 要创建Agent |
| | |
| | | |
| | | public void UpdateCanvas(Canvas canvas) |
| | | { |
| | | EffectPenetrationBlocker[] blockers = battleRootNode.GetComponentsInChildren<EffectPenetrationBlocker>(true); |
| | | |
| | | if (null != blockers) |
| | | foreach (var obj in battleObjMgr.allBattleObjDict.Values) |
| | | { |
| | | foreach (var blocker in blockers) |
| | | { |
| | | blocker.SetParentCanvas(canvas); |
| | | } |
| | | obj.layerMgr.UpdateLayer(); |
| | | } |
| | | |
| | | // RendererAdjuster[] adjusters = battleRootNode.GetComponentsInChildren<RendererAdjuster>(true); |