public void RunVisitor(ICharacterVisitor visitor) { foreach (ICharacter character in mEnemys) { character.RunVisitor(visitor); } foreach (ICharacter character in mSoldiers) { character.RunVisitor(visitor); } }
// 執行Visitor public void RunVisitor(ICharacterVisitor Visitor) { foreach (ICharacter Character in m_Soldiers) { Character.RunVisitor(Visitor); } foreach (ICharacter Character in m_Enemys) { Character.RunVisitor(Visitor); } }
/// <summary> /// 访问者模式, 将Visitor传进来,并各个角色执行访问 /// </summary> /// <param name="visitor"></param> public void RunVisitor(ICharacterVisitor visitor) { foreach (var item in m_Enemys) { item.RunVisitor(visitor); } foreach (var item in m_Soldiers) { item.RunVisitor(visitor); } }
/// <summary> ///运行角色访问器 /// </summary> /// <param name="characterVisitor"></param> public void RunVisitor(ICharacterVisitor characterVisitor) { foreach (ICharacter e in mEnemys) { e.RunVisitor(characterVisitor); } foreach (ICharacter s in mSoldiers) { s.RunVisitor(characterVisitor); } }
public void RunVisitor(ICharacterVisitor visitor) { foreach (IEnemy enemy in mEnemys) { enemy.RunVisitor(visitor); } foreach (ISoldier soldier in mSoldiers) { soldier.RunVisitor(visitor); } }
public override void Accept(ICharacterVisitor visitor) { visitor.Visit(this); }
public override void RunVisitor(ICharacterVisitor visitor) { visitor.VisitSoldier(this); }
// 執行Visitor public void RunVisitor(ICharacterVisitor Visitor) { foreach( ICharacter Character in m_Soldiers) Character.RunVisitor( Visitor); foreach( ICharacter Character in m_Enemys) Character.RunVisitor( Visitor); }
// 執行Visitor public override void RunVisitor(ICharacterVisitor Visitor) { Visitor.VisitEnemyOgre(this); }
// 執行Visitor public override void RunVisitor(ICharacterVisitor Visitor) { // }
public override void RunVisitor(ICharacterVisitor characterVisitor) { base.RunVisitor(characterVisitor); characterVisitor.VisitorCaptain(this); }
// 執行角色系統的Visitor public void RunCharacterVisitor(ICharacterVisitor Visitor) { m_CharacterSystem.RunVisitor( Visitor ); }
public override void RunVisitor(ICharacterVisitor characterVisitor) { characterVisitor.VisitorEnemy(this); }
public override void RunVisitor(ICharacterVisitor characterVisitor) { base.RunVisitor(characterVisitor); characterVisitor.VisitorRookie(this); }
// 執行Visitor public override void RunVisitor(ICharacterVisitor Visitor) { Visitor.VisitSoldierSergeant(this); }
public virtual void RunVisitor(ICharacterVisitor visitor) { }
public override void RunVisitor(ICharacterVisitor Visitor) { Visitor.VisitCharacter(this); }
// 執行Visitor public override void RunVisitor(ICharacterVisitor Visitor) { Visitor.VisitSoldierCaptain(this); }
// 執行Visitor public override void RunVisitor(ICharacterVisitor Visitor) { Visitor.VisitEnemyElf(this); }
// 执行角色系统的Visitor public void RunCharacterVisitor(ICharacterVisitor Visitor) { m_CharacterSystem.RunVisitor(Visitor); }
// 執行Visitor public override void RunVisitor(ICharacterVisitor Visitor) { Visitor.VisitSoldierCaptive(this); }
// 執行Visitor public virtual void RunVisitor(ICharacterVisitor Visitor) { Visitor.VisitCharacter(this); }
// 执行Visitor public virtual void RunVisitor(ICharacterVisitor Visitor) { Visitor.VisitCharacter(this); }
public abstract void RunVisitor(ICharacterVisitor visitor);
public override void RunVisitor(ICharacterVisitor visitor) { visitor.VisitEnemy(this); }
// 执行Visitor public override void RunVisitor(ICharacterVisitor Visitor) { Visitor.VisitSoldierRookie(this); }
public void RunVisitor(ICharacterVisitor visitor) { mCharacterSystem.RunVisitor(visitor); }
public override void RunVisitor(ICharacterVisitor characterVisitor) { base.RunVisitor(characterVisitor); characterVisitor.VisitorSergeant(this); }