public override void Query(object sender, StateQuery query) { if (!ReferenceEquals(sender, this) && query.State == State.Attack) { query.Value++; } else { base.Query(sender, query); } }
public override void Query(object sender, StateQuery query) { if (ReferenceEquals(sender, this)) { switch (query.State) { case State.Attack: query.Value += baseAttack; break; case State.Defense: query.Value += baseDefense; break; } } else { if (query.State == State.Defense) { query.Value++; } } }
public abstract void Query(object sender, StateQuery query);