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"); } }
private void PlayDeployAnimation(int speed) { if (speed < 0) { DeployAnimation[deployAnimationName].time = DeployAnimation[deployAnimationName].length; } DeployAnimation[deployAnimationName].speed = speed; DeployAnimation.Play(deployAnimationName); }
public void ReverseDeployAnimation(int speed = -1) { if (secondaryAnimationName != "") { SecondaryAnimation.Stop(secondaryAnimationName); } DeployAnimation[deployAnimationName].time = DeployAnimation[deployAnimationName].length; DeployAnimation[deployAnimationName].speed = speed; DeployAnimation.Play(deployAnimationName); }
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; }
public override void OnStart(StartState state) { DeployAnimation.wrapMode = WrapMode.ClampForever; DeployAnimation.Play(deployAnimationName); DeployAnimation[deployAnimationName].normalizedTime = isDeployed ? targetInflationPercentage : 0f; UpdateEvents(); base.OnStart(state); }
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; } }
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); }
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); } } }
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"); } }
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; } }
private void PlayDeployAnimation(int speed = 1) { DeployAnimation[deployAnimationName].speed = speed; DeployAnimation.Play(deployAnimationName); SetDragState(1f); }