示例#1
0
 public void InitGraphics(ContentManager Content)
 {
     foreach (MagicElementAttribute ActiveAttribute in ArrayAttributes)
     {
         ActiveAttribute.InitGraphics(Content);
     }
 }
示例#2
0
 /// <summary>
 /// Moves to the first attribute.
 /// </summary>
 /// <returns>
 /// true if an attribute exists (the reader moves to the first attribute); otherwise, false (the position of the reader does not change).
 /// </returns>
 public override bool MoveToFirstAttribute()
 {
     if (IsTerminal)
     {
         activeAttribute  = ActiveAttribute.Line;
         onAttributeValue = false;
         return(true);
     }
     return(false);
 }
示例#3
0
 /// <summary>
 /// Moves to the element that contains the current attribute node.
 /// </summary>
 /// <returns>
 /// true if the reader is positioned on an attribute (the reader moves to the element that owns the attribute); false if the reader is not positioned on an attribute (the position of the reader does not change).
 /// </returns>
 public override bool MoveToElement()
 {
     if (activeAttribute != ActiveAttribute.None)
     {
         activeAttribute  = ActiveAttribute.None;
         onAttributeValue = false;
         return(true);
     }
     return(false);
 }
示例#4
0
        public async Task <InvocationContext?> DetermineInvocationAsync()
        {
            var target = await ActiveAttribute.SelectTargetAsync(Context, Doer.TargetingStrategy);

            if (target == null)
            {
                return(null);
            }

            return(new InvocationContext(this, target));
        }
示例#5
0
        /// <summary>
        /// Moves to the next attribute.
        /// </summary>
        /// <returns>
        /// true if there is a next attribute; false if there are no more attributes.
        /// </returns>
        public override bool MoveToNextAttribute()
        {
            switch (activeAttribute)
            {
            case ActiveAttribute.None:
                return(MoveToFirstAttribute());

            case ActiveAttribute.Line:
                activeAttribute  = ActiveAttribute.Column;
                onAttributeValue = false;
                return(true);
            }
            return(false);
        }
示例#6
0
        /// <summary>
        /// Moves to the attribute with the specified <see cref="P:System.Xml.XmlReader.Name"/>.
        /// </summary>
        /// <param name="name">The qualified name of the attribute.</param>
        /// <returns>
        /// true if the attribute is found; otherwise, false. If false, the reader's position does not change.
        /// </returns>
        public override bool MoveToAttribute(string name)
        {
            if (IsTerminal)
            {
                switch (name)
                {
                case "line":
                    activeAttribute  = ActiveAttribute.Line;
                    onAttributeValue = false;
                    return(true);

                case "column":
                    activeAttribute  = ActiveAttribute.Column;
                    onAttributeValue = false;
                    return(true);
                }
            }
            return(false);
        }
 /// <summary>
 /// Moves to the next attribute.
 /// </summary>
 /// <returns>
 /// true if there is a next attribute; false if there are no more attributes.
 /// </returns>
 public override bool MoveToNextAttribute()
 {
     switch (activeAttribute) {
     case ActiveAttribute.None:
         return MoveToFirstAttribute();
     case ActiveAttribute.Line:
         activeAttribute = ActiveAttribute.Column;
         onAttributeValue = false;
         return true;
     }
     return false;
 }
 /// <summary>
 /// Moves to the first attribute.
 /// </summary>
 /// <returns>
 /// true if an attribute exists (the reader moves to the first attribute); otherwise, false (the position of the reader does not change).
 /// </returns>
 public override bool MoveToFirstAttribute()
 {
     if (IsTerminal) {
         activeAttribute = ActiveAttribute.Line;
         onAttributeValue = false;
         return true;
     }
     return false;
 }
 /// <summary>
 /// Moves to the element that contains the current attribute node.
 /// </summary>
 /// <returns>
 /// true if the reader is positioned on an attribute (the reader moves to the element that owns the attribute); false if the reader is not positioned on an attribute (the position of the reader does not change).
 /// </returns>
 public override bool MoveToElement()
 {
     if (activeAttribute != ActiveAttribute.None) {
         activeAttribute = ActiveAttribute.None;
         onAttributeValue = false;
         return true;
     }
     return false;
 }
 /// <summary>
 /// Moves to the attribute with the specified <see cref="P:System.Xml.XmlReader.Name"/>.
 /// </summary>
 /// <param name="name">The qualified name of the attribute.</param>
 /// <returns>
 /// true if the attribute is found; otherwise, false. If false, the reader's position does not change.
 /// </returns>
 public override bool MoveToAttribute(string name)
 {
     if (IsTerminal) {
         switch (name) {
         case "line":
             activeAttribute = ActiveAttribute.Line;
             onAttributeValue = false;
             return true;
         case "column":
             activeAttribute = ActiveAttribute.Column;
             onAttributeValue = false;
             return true;
         }
     }
     return false;
 }
示例#11
0
 public Task RunAsync()
 {
     return(ActiveAttribute.RunAsync(this));
 }
示例#12
0
 public TargetSelectionContext(BattleContext <TBattler> context, TBattler battler, ActiveAttribute activeAttribute)
 {
     Context         = context;
     Doer            = battler;
     ActiveAttribute = activeAttribute;
 }