private bool InitCommandBuffer(object data) { if (_nCurrentShellingCnt == _listCmdActionList.Count) { OnShellingPhaseFinished(); return(false); } _isFriendActionExit = false; _isEnemyActionExit = false; EffectModel effectModel = BattleTaskManager.GetBattleManager().GetEffectData(_nCurrentShellingCnt); if (effectModel != null) { BattleTaskManager.GetPrefabFile().prodBattleCommandBuffer = ProdBattleCommandBuffer.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdBattleCommandBuffer).GetComponent <ProdBattleCommandBuffer>(), BattleTaskManager.GetStage(), effectModel, _nCurrentShellingCnt); BattleTaskManager.GetPrefabFile().prodBattleCommandBuffer.Play(delegate { if (effectModel.Withdrawal) { BattleTaskManager.ReqPhase(BattlePhase.WithdrawalDecision); } else { CheckNextAction(); } }); } else { CheckNextAction(); } return(false); }
private bool InitCommandBuffer(object data) { EffectModel effectModel = BattleTaskManager.GetBattleManager().GetOpeningEffectData(); if (effectModel != null) { BattleTaskManager.GetPrefabFile().prodBattleCommandBuffer = ProdBattleCommandBuffer.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdBattleCommandBuffer).GetComponent <ProdBattleCommandBuffer>(), BattleTaskManager.GetStage(), effectModel, 0); BattleTaskManager.GetPrefabFile().prodBattleCommandBuffer.Play(delegate { if (effectModel.Withdrawal) { OnCommandBufferFinished2Withdrawal(); } else { OnCommandBufferFinished(); } }); _prodBattleCommandSelect.DiscardAfterFadeIn().setOnComplete((Action) delegate { Mem.DelComponentSafe(ref _prodBattleCommandSelect); }); } else { OnCommandBufferFinished(); Observable.TimerFrame(20, FrameCountType.EndOfFrame).Subscribe(delegate { _prodBattleCommandSelect.DiscardAfterFadeIn().setOnComplete((Action) delegate { Mem.DelComponentSafe(ref _prodBattleCommandSelect); }); }); } return(false); }