示例#1
0
        public override bool removeTweenProperty(AbstractTweenProperty property)
        {
            if (_tweenPropertyList.Contains(property))
            {
                _tweenPropertyList.Remove(property);
                return(true);
            }

            return(false);
        }
示例#2
0
        public override bool containsTweenProperty(AbstractTweenProperty property)
        {
            foreach (var flowItem in _tweenFlows)
            {
                // skip delay items which have no tween
                if (flowItem.tween == null)
                {
                    continue;
                }

                if (flowItem.tween.containsTweenProperty(property))
                {
                    return(true);
                }
            }

            return(false);
        }
示例#3
0
        /// <summary>
        /// adds the tween property if it passes validation and initializes the property
        /// </summary>
        public void addTweenProperty(AbstractTweenProperty tweenProp)
        {
            // make sure the target is valid for this tween before adding
            if (tweenProp.validateTarget(target))
            {
                // ensure we dont add two tweens of the same property so they dont fight
                if (_tweenPropertyList.Contains(tweenProp))
                {
                    Debug.Log("not adding tween property because one already exists: " + tweenProp);
                    return;
                }

                _tweenPropertyList.Add(tweenProp);
                tweenProp.init(this);
            }
            else
            {
                Debug.Log("tween failed to validate target: " + tweenProp);
            }
        }
示例#4
0
        /// <summary>
        /// adds a TweenProperty to the list
        /// </summary>
        public GoTweenConfig addTweenProperty(AbstractTweenProperty tweenProp)
        {
            _tweenProperties.Add(tweenProp);

            return(this);
        }
示例#5
0
 public override bool containsTweenProperty(AbstractTweenProperty property)
 {
     return(_tweenPropertyList.Contains(property));
 }