コード例 #1
0
        protected override void DisposeCustomActions()
        {
            UnityUIButton button = _joystick.GetComponent <UnityUIButton>();

            button.OnButtonPressedDown -= OnJoystickPressDown;
            button.OnTappedAndHeld     -= OnJoystickPressDown;
            button.OnButtonPressedUp   -= OnJoystickPressUp;
            button.OnButtonTapped      -= OnJoystickPressUp;
        }
コード例 #2
0
        public JoystickMoveInputController(bool isActive, bool ignoreZeroDir)
            : base(isActive, ignoreZeroDir)
        {
            _joystick = Object.FindObjectOfType <Joystick>();

            UnityUIButton button = _joystick.GetComponent <UnityUIButton>();

            button.OnButtonPressedDown += OnJoystickPressDown;
            button.OnTappedAndHeld     += OnJoystickPressDown;
            button.OnButtonPressedUp   += OnJoystickPressUp;
            button.OnButtonTapped      += OnJoystickPressUp;
        }