/// <summary> /// 移除效果处理 /// </summary> /// <param name="effectProcess"></param> public void RemoveEffectProcess(EffectProcessBase effectProcess) { if (currentEffectProcess == effectProcess) { currentEffectProcess = null; } effectProcessList.Remove(effectProcess); }
/// <summary> /// 移除当前效果处理类 /// </summary> /// <param name="effectProcess"></param> public void RemoveCurrentEffectProcess(EffectProcessBase effectProcess) { if (currentEffectProcess == null) { return; } else if (currentEffectProcess == effectProcess) { currentEffectProcess = null; } else { Debug.LogError("此玩家无法移除当前效果处理!"); } }
public void Update() { if (startDuel) { if (Input.GetMouseButtonDown(1)) { MouseRightButtonDown(); } //判断连锁 if (effectProcessChainStack.Count > 0) { EffectProcessBase effectProcess = effectProcessChainStack.Peek(); if (effectProcess.GetHaveFinish()) { effectProcessChainStack.Pop(); } else { if (effectProcess.GetBeInterrupted()) { if (effectProcess != effectProcess.GetOwnerPlayer().GetCurrentEffectProcess()) { effectProcess.GetOwnerPlayer().SetCurrentEffectProcess(effectProcess); } effectProcess.ContinueProcess(); } } } else { currentPlayer.ThinkAction(); } startPlayer.Update(); startPlayer.GetOpponentPlayer().Update(); if (currentInfoCard != null) { currentInfoCard.Update(); } } }
/// <summary> /// 添加效果连锁 /// </summary> /// <param name="effectProcess"></param> public void AddEffectProcessChain(EffectProcessBase effectProcess) { effectProcessChainStack.Push(effectProcess); }
/// <summary> /// 一般由效果处理类调用,设置当前对玩家产生影响效果处理类 /// </summary> /// <param name="currentEffectProcess"></param> public void SetCurrentEffectProcess(EffectProcessBase currentEffectProcess) { this.currentEffectProcess = currentEffectProcess; }
/// <summary> /// 添加效果处理 /// </summary> public void AddEffectProcess(EffectProcessBase effectProcess) { effectProcessList.Add(effectProcess); effectProcess.Process(); }