Example #1
0
    private void SetSwitchExit(SwitchExit switchExit)
    {
        currentExit = switchExit;

        playMusicClipSignal.Fire(changeSwitchSound);
        UpdateRotation();
    }
Example #2
0
 private void OnValidate()
 {
     if (DefaultExit == SwitchExit.Ahead && SwitchType == SwitchType.TwoWay)
     {
         DefaultExit = SwitchExit.Left;
     }
     currentExit = DefaultExit;
     UpdateRotation();
 }
Example #3
0
    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);
    }
Example #4
0
    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();
    }