Exemple #1
0
        public override ProgrammingElement Clone()
        {
            CircleDistanceModifier clone = new CircleDistanceModifier();

            CopyTo(clone);
            return(clone);
        }
Exemple #2
0
        public override void Fixup(Reflex reflex)
        {
            base.Fixup(reflex);

            radiusScale = 1.0f;
            for (int imod = 0; imod < reflex.Modifiers.Count; ++imod)
            {
                CircleDistanceModifier cdMod = reflex.Modifiers[imod] as CircleDistanceModifier;
                if (cdMod != null)
                {
                    radiusScale *= cdMod.radiusScale;
                }
            }

            Task task = reflex.Task;

            controlZ = true;
            for (int iref = 0; iref < task.reflexes.Count; ++iref)
            {
                Reflex otherReflex = task.reflexes[iref] as Reflex;
                if ((otherReflex != null) && (otherReflex != reflex))
                {
                    Selector otherSelector = otherReflex.Selector;
                    if ((otherSelector is MoveDownSelector) ||
                        (otherSelector is MoveUpDownSelector) ||
                        (otherSelector is MoveUpSelector) ||
                        (otherSelector is FollowWaypointsSelector))
                    {
                        controlZ = false;
                        break;
                    }
                }
            }
        }
Exemple #3
0
 protected void CopyTo(CircleDistanceModifier clone)
 {
     base.CopyTo(clone);
     clone.radiusScale = this.radiusScale;
 }