public void ExtendFully() { var scale = transform.localScale; transform.localScale = new Vector3(scale.x, MaxTendrilLengthScale, scale.z); State = TendrilState.Extended; }
public void GrowTendril(float amount) { var scale = transform.localScale; if (scale.y + amount > MaxTendrilLengthScale) { transform.localScale = new Vector3(scale.x, MaxTendrilLengthScale, scale.z); State = TendrilState.Extended; } else { transform.localScale = new Vector3(scale.x, scale.y + amount, scale.z); State = TendrilState.Extended; } }
public void ShrinkTendril(float amount) { var scale = transform.localScale; if (scale.y - amount < MinTendrilLengthScale) { transform.localScale = new Vector3(scale.x, MinTendrilLengthScale, scale.z); State = TendrilState.Retracted; } else { transform.localScale = new Vector3(scale.x, scale.y - amount, scale.z); State = TendrilState.Moving; } }