示例#1
0
 public override void started(float timelineTime, Clock clock)
 {
     startTranslation = this.PropSimObject.Translation;
     startRotation    = this.PropSimObject.Rotation;
     finished         = false;
     propBehavior     = PropSimObject.getElement(PropFactory.FadeBehaviorName) as PropFadeBehavior;
 }
 public override void skipTo(float timelineTime)
 {
     line        = PropSimObject.getElement(LineProp.BehaviorName) as LineProp;
     line.Length = length;
     line.Color  = color;
     line.createLine();
 }
示例#3
0
 public override void skipTo(float timelineTime)
 {
     plane       = PropSimObject.getElement(Plane.BehaviorName) as Plane;
     plane.Color = color;
     plane.Size  = size;
     plane.createObject();
 }
示例#4
0
 public override void editing(PropEditController propEditController)
 {
     if (PropSimObject != null)
     {
         caliper = PropSimObject.getElement(Caliper.BehaviorName) as Caliper;
         caliper.setMeasurement(Millimeters);
     }
 }
 public override void editing(PropEditController propEditController)
 {
     if (PropSimObject != null)
     {
         arrow       = PropSimObject.getElement(Arrow.ArrowBehaviorName) as Arrow;
         arrow.Color = ArrowColor;
     }
 }
 public override void editing(PropEditController propEditController)
 {
     if (PropSimObject != null)
     {
         arrow            = PropSimObject.getElement(Arrow.ArrowBehaviorName) as Arrow;
         arrow.Scale      = scale;
         arrow.TailLength = tailLength;
     }
 }
 public override void skipTo(float timelineTime)
 {
     highlight           = PropSimObject.getElement(CircularHighlight.BehaviorName) as CircularHighlight;
     highlight.MajorAxis = majorAxis;
     highlight.MinorAxis = minorAxis;
     highlight.Theta     = theta;
     highlight.Color     = color;
     highlight.Thickness = thickness;
     highlight.createEllipse();
 }
 public override void editing(PropEditController propEditController)
 {
     if (PropSimObject != null)
     {
         line        = PropSimObject.getElement(LineProp.BehaviorName) as LineProp;
         line.Length = length;
         line.Color  = color;
         line.createLine();
     }
 }
示例#9
0
 public override void editing(PropEditController propEditController)
 {
     if (PropSimObject != null)
     {
         plane       = PropSimObject.getElement(Plane.BehaviorName) as Plane;
         plane.Color = color;
         plane.Size  = size;
         plane.createObject();
     }
 }
 public override void editing(PropEditController propEditController)
 {
     if (PropSimObject != null)
     {
         syringe = PropSimObject.getElement(Syringe.BehaviorName) as Syringe;
         if (syringe != null)
         {
             syringe.setPlungePosition(PlungePercentage);
         }
     }
 }
 public override void started(float timelineTime, Clock clock)
 {
     syringe = PropSimObject.getElement(Syringe.BehaviorName) as Syringe;
     if (syringe != null)
     {
         syringe.plunge(PlungePercentage, Duration);
     }
     else
     {
         Log.Warning("Prop SimObject does not have a Syringe behavior, cannot push plunger.");
     }
 }
示例#12
0
 public override void skipTo(float timelineTime)
 {
     if (timelineTime <= EndTime)
     {
         started(timelineTime, null);
     }
     else
     {
         propBehavior = PropSimObject.getElement(PropFactory.FadeBehaviorName) as PropFadeBehavior;
         propBehavior.changePosition(endTranslation, endRotation);
         finished = true;
     }
 }
 public override void editing(PropEditController propEditController)
 {
     if (PropSimObject != null)
     {
         highlight           = PropSimObject.getElement(CircularHighlight.BehaviorName) as CircularHighlight;
         highlight.MajorAxis = majorAxis;
         highlight.MinorAxis = minorAxis;
         highlight.Theta     = theta;
         highlight.Color     = color;
         highlight.Thickness = thickness;
         highlight.createEllipse();
     }
 }
        private void doAttachment()
        {
            DetachableSimObjectFollower follower = PropSimObject.getElement(PropFactory.DetachableFollowerName) as DetachableSimObjectFollower;

            if (follower != null)
            {
                if (Attached)
                {
                    follower.attach(TargetObject);
                }
                else
                {
                    follower.detach();
                }
            }
        }
        private void findHandBehavior()
        {
            hand = (PoseableHand)PropSimObject.getElement(PoseableHand.PoseableHandBehavior);

            Thumb.setFinger(hand.Thumb);
            Thumb.getStartingValues();

            Index.setFinger(hand.Index);
            Index.getStartingValues();

            Middle.setFinger(hand.Middle);
            Middle.getStartingValues();

            Ring.setFinger(hand.Ring);
            Ring.getStartingValues();

            Pinky.setFinger(hand.Pinky);
            Pinky.getStartingValues();
        }
 public override void skipTo(float timelineTime)
 {
     propBehavior = PropSimObject.getElement(PropFactory.FadeBehaviorName) as PropFadeBehavior;
     if (timelineTime <= EndTime)
     {
         //Figure out how transparent we should be
         //This is pretty screwy right now, but whatever can fix later.
         if (Duration != 0.0f)
         {
             float partialFade = ((timelineTime - StartTime) / Duration) * transparency;
             propBehavior.CurrentTransparency += (transparency - propBehavior.CurrentTransparency) * partialFade;
         }
         propBehavior.fade(transparency, EndTime - timelineTime);
     }
     else
     {
         propBehavior.fade(transparency, 0.0f);
         finished = true;
     }
 }
 public override void started(float timelineTime, Engine.Platform.Clock clock)
 {
     arrow       = PropSimObject.getElement(Arrow.ArrowBehaviorName) as Arrow;
     arrow.Color = ArrowColor;
 }
 public override void started(float timelineTime, Clock clock)
 {
     finished     = false;
     propBehavior = PropSimObject.getElement(PropFactory.FadeBehaviorName) as PropFadeBehavior;
     propBehavior.fade(transparency, Duration);
 }
 public override void skipTo(float timelineTime)
 {
     arrow            = PropSimObject.getElement(Arrow.ArrowBehaviorName) as Arrow;
     arrow.Scale      = scale;
     arrow.TailLength = tailLength;
 }
示例#20
0
 public override void skipTo(float timelineTime)
 {
     caliper = PropSimObject.getElement(Caliper.BehaviorName) as Caliper;
     caliper.setMeasurement(Millimeters * ((timelineTime - StartTime) / Duration));
     caliper.moveToMeasurement(Millimeters, Duration - (timelineTime - StartTime));
 }
示例#21
0
 public override void started(float timelineTime, Clock clock)
 {
     caliper = PropSimObject.getElement(Caliper.BehaviorName) as Caliper;
     caliper.moveToMeasurement(Millimeters, Duration);
 }
示例#22
0
 public override void skipTo(float timelineTime)
 {
     pen         = PropSimObject.getElement(Pen.PenBehaviorName) as Pen;
     pen.Clicked = !pen.Clicked;
 }
示例#23
0
 public override void started(float timelineTime, Clock clock)
 {
     pen         = PropSimObject.getElement(Pen.PenBehaviorName) as Pen;
     pen.Clicked = !pen.Clicked;
 }
 public override void skipTo(float timelineTime)
 {
     arrow       = PropSimObject.getElement(Arrow.ArrowBehaviorName) as Arrow;
     arrow.Color = ArrowColor;
 }