コード例 #1
0
 public virtual void deployEvent()
 {
     primaryAnimator(animSpeed * 1f, 0f, WrapMode.Default, animationName, anim);
     IsDeployed = !oneWayAnimation;
     if (USScience)
     {
         if (anim4 != null)
         {
             primaryAnimator(animSpeed * 1f, 0f, WrapMode.Default, bayAnimation, anim4);
         }
         if (anim3 != null)
         {
             primaryAnimator(animSpeed * 2.5f, 0f, WrapMode.Loop, looperAnimation, anim3);
         }
     }
     if (USStock)
     {
         if (enviroList.Count > 0)
         {
             foreach (DMEnviroSensor DMES in enviroList)
             {
                 if (!DMES.sensorActive && DMES.primary)
                 {
                     DMES.toggleSensor();
                 }
             }
         }
     }
     Events["deployEvent"].active  = oneWayAnimation;
     Events["retractEvent"].active = showEndEvent;
 }
コード例 #2
0
 public virtual void retractEvent()
 {
     if (oneWayAnimation)
     {
         return;
     }
     primaryAnimator(-1f * animSpeed, 1f, WrapMode.Default, animationName, anim);
     IsDeployed = false;
     if (USScience)
     {
         if (anim4 != null)
         {
             if (anim[animationName].length > anim4[bayAnimation].length && anim4[bayAnimation].length != 0)
             {
                 primaryAnimator(-1f * animSpeed, (anim[animationName].length / anim4[bayAnimation].length), WrapMode.Default, bayAnimation, anim4);
             }
             else
             {
                 primaryAnimator(-1f * animSpeed, 1f, WrapMode.Default, bayAnimation, anim4);
             }
         }
         if (anim3 != null)
         {
             anim3[looperAnimation].normalizedTime = anim3[looperAnimation].normalizedTime % 1;
             anim3[looperAnimation].wrapMode       = WrapMode.Clamp;
         }
     }
     if (USStock)
     {
         if (enviroList.Count > 0)
         {
             foreach (DMEnviroSensor DMES in enviroList)
             {
                 if (DMES.sensorActive && DMES.primary)
                 {
                     DMES.toggleSensor();
                 }
             }
         }
     }
     Events["deployEvent"].active  = showStartEvent;
     Events["retractEvent"].active = false;
 }