private void SetSwitchExit(SwitchExit switchExit) { currentExit = switchExit; playMusicClipSignal.Fire(changeSwitchSound); UpdateRotation(); }
private void OnValidate() { if (DefaultExit == SwitchExit.Ahead && SwitchType == SwitchType.TwoWay) { DefaultExit = SwitchExit.Left; } currentExit = DefaultExit; UpdateRotation(); }
public static SwitchExit NextValid(this SwitchExit value, SwitchType type) { var next = value.Next(); if (type == SwitchType.TwoWay && next == SwitchExit.Ahead) { next = next.Next(); } return(next); }
private void Start() { slider.gameObject.SetActive(false); if (Hotkey == Hotkey.Auto) { Hotkey = GetFirstUnusedHotkey(); } var hotkeyName = Hotkey.ToString(); GetComponentInChildren <Text>().text = hotkeyName.Substring(hotkeyName.Length - 1); Bottom.Speed = OutputSpeed; // disable hotkey UI on mobile #if UNITY_ANDROID || UNITY_IOS GetComponentInChildren <Text>().transform.parent.gameObject.SetActive(false); #endif currentExit = DefaultExit; UpdateRotation(); }