private void PlayDeployAnimation(int speed)
 {
     try
     {
         if (speed < 0)
         {
             DeployAnimation[deployAnimationName].time = DeployAnimation[deployAnimationName].length;
             if (unfoldAnimationName != "")
             {
                 UnfoldAnimation[unfoldAnimationName].time = UnfoldAnimation[unfoldAnimationName].length;
             }
         }
         DeployAnimation[deployAnimationName].speed = speed;
         DeployAnimation.Play(deployAnimationName);
         if (unfoldAnimationName != "")
         {
             UnfoldAnimation[unfoldAnimationName].speed = speed;
             UnfoldAnimation.Play(unfoldAnimationName);
         }
     }
     catch (Exception)
     {
         print("[WARP] ERROR IN PlayDeployAnimation");
     }
 }
Exemplo n.º 2
0
 private void PlayDeployAnimation(int speed)
 {
     if (speed < 0)
     {
         DeployAnimation[deployAnimationName].time = DeployAnimation[deployAnimationName].length;
     }
     DeployAnimation[deployAnimationName].speed = speed;
     DeployAnimation.Play(deployAnimationName);
 }
Exemplo n.º 3
0
 public void ReverseDeployAnimation(int speed = -1)
 {
     if (secondaryAnimationName != "")
     {
         SecondaryAnimation.Stop(secondaryAnimationName);
     }
     DeployAnimation[deployAnimationName].time  = DeployAnimation[deployAnimationName].length;
     DeployAnimation[deployAnimationName].speed = speed;
     DeployAnimation.Play(deployAnimationName);
 }
Exemplo n.º 4
0
 public void DeflateLifeboat(int speed)
 {
     print("Deflating");
     DeployAnimation[deployAnimationName].time  = DeployAnimation[deployAnimationName].length;
     DeployAnimation[deployAnimationName].speed = speed;
     DeployAnimation.Play(deployAnimationName);
     HatchAnimation[hatchAnimationName].speed = speed;
     HatchAnimation.Play(hatchAnimationName);
     part.CrewCapacity = 0;
 }
Exemplo n.º 5
0
        public override void OnStart(StartState state)
        {
            DeployAnimation.wrapMode = WrapMode.ClampForever;
            DeployAnimation.Play(deployAnimationName);

            DeployAnimation[deployAnimationName].normalizedTime = isDeployed ?  targetInflationPercentage : 0f;

            UpdateEvents();

            base.OnStart(state);
        }
Exemplo n.º 6
0
 public void DeflateAirbags()
 {
     if (isDeployed)
     {
         isDeployed = false;
         DeployAnimation[deployAnimationName].speed = -.25f;
         DeployAnimation[deployAnimationName].time  = DeployAnimation[deployAnimationName].length;
         DeployAnimation.Play(deployAnimationName);
         ToggleEvent("DeflateAirbags", false);
         Events["RechargeAirbags"].active = true;
     }
 }
Exemplo n.º 7
0
        private void PlayDeployAnimation(int speed)
        {
            if (speed < 0)
            {
                if (activeAnimationName != "")
                {
                    ActiveAnimation.Stop(activeAnimationName);
                }

                DeployAnimation[deployAnimationName].time = DeployAnimation[deployAnimationName].length;
            }
            DeployAnimation[deployAnimationName].speed = speed;
            DeployAnimation.Play(deployAnimationName);
        }
Exemplo n.º 8
0
 public void InflateAirbags()
 {
     if (!isDeployed)
     {
         if (isCharged || _state == StartState.Editor)
         {
             isCharged  = false;
             isDeployed = true;
             DeployAnimation[deployAnimationName].speed = 1;
             DeployAnimation.Play(deployAnimationName);
             ToggleEvent("DeflateAirbags", true);
             ToggleEvent("InflateAirbags", false);
         }
     }
 }
Exemplo n.º 9
0
 private void PlayDeployAnimation(int speed)
 {
     try
     {
         if (speed < 0)
         {
             DeployAnimation[deployAnimationName].time = DeployAnimation[deployAnimationName].length;
         }
         DeployAnimation[deployAnimationName].speed = speed;
         DeployAnimation.Play(deployAnimationName);
     }
     catch (Exception)
     {
         print("[WSXWARP] ERROR IN PlayDeployAnimation");
     }
 }
Exemplo n.º 10
0
 private void PlayDeployAnimation(int speed = 1)
 {
     print("Inflating");
     DeployAnimation[deployAnimationName].speed = speed;
     DeployAnimation.Play(deployAnimationName);
     HatchAnimation[hatchAnimationName].speed = speed;
     HatchAnimation.Play(hatchAnimationName);
     isDeployed        = true;
     part.CrewCapacity = 1;
     ToggleEvent("InflateLifeboat", false);
     ToggleEvent("DeployKickstand", true);
     if (!isUnsealed)
     {
         AddResources();
         isUnsealed = true;
     }
 }
Exemplo n.º 11
0
 private void PlayDeployAnimation(int speed = 1)
 {
     DeployAnimation[deployAnimationName].speed = speed;
     DeployAnimation.Play(deployAnimationName);
     SetDragState(1f);
 }