protected override void DisposeCustomActions() { UnityUIButton button = _joystick.GetComponent <UnityUIButton>(); button.OnButtonPressedDown -= OnJoystickPressDown; button.OnTappedAndHeld -= OnJoystickPressDown; button.OnButtonPressedUp -= OnJoystickPressUp; button.OnButtonTapped -= OnJoystickPressUp; }
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; }