static void UpdateStretch(InputSet input, Limb limb) { var keyDown = input.GetStretch(limb); var stretch = StretchSpeed * Time.deltaTime; RemoveOxygen(Astronaut.Stretch(limb, keyDown? stretch : -stretch)); }
protected override void Update(InputSet input) { switch (Type) { case SpasmType.Push: Astronaut.Stretch(Limb, (Strength + Astronaut.StartStretchSpeed) * Time.deltaTime); break; case SpasmType.Pull: Astronaut.Stretch(Limb, -Strength * Time.deltaTime); break; case SpasmType.Twitch: if (Remaining > (Length / 2f)) { goto case SpasmType.Push; } goto case SpasmType.Pull; default: throw new ArgumentOutOfRangeException(); } }