public void Handle(int level) { if (mCommands.Count != 0) { mCommands[0].Execute(); mCommands.RemoveAt(0); } if (level == mLv) { RefreshCharacter(); LoopRefreshCharacter(); UpdateStage(); CheckIsFinished(); } else { if (mNextHandler != null) { mNextHandler.Handle(level); } else { } } }
private void Update() { if (mIsPause) { return; } UpdateNode(); mRootHandler.Handle(mLv); }
public void Handle(int level) { if (level == mLv) { UpdateStage(); CheckIsFinished(); } else { mNextHandler.Handle(level); } }
public void Handle(int lv) { if (lv == mLv) { UpdateStage(); CheckIsFinished();//检查关卡是否结束 } else { mNextHandler.Handle(lv); } }
/// <summary> /// 责任链模式核心思想,当前节点完成不了,就遍历下一个节点去解决 /// </summary> /// <param name="level"></param> public void Handle(int level) { if (level == m_Lv) { UpdateStage(); CheckIsFinished(); } else { if (m_NextHandler != null) { m_NextHandler.Handle(level); } } }
public override void Update() { base.Update(); mRootHandler.Handle(mLv); }
public void Update() { mRootHandler.Handle(mLv); }