コード例 #1
0
 public override void Query(object sender, StateQuery query)
 {
     if (!ReferenceEquals(sender, this) && query.State == State.Attack)
     {
         query.Value++;
     }
     else
     {
         base.Query(sender, query);
     }
 }
コード例 #2
0
        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++;
                }
            }
        }
コード例 #3
0
 public abstract void Query(object sender, StateQuery query);