private void OnEnable() { EventHandGrip.AddListener(OnGrip); EventHandIdle.AddListener(OnIdle); MSwitchManager.AddListener(OnSwitch); }
/// <summary> /// 释放 /// </summary> public void SetGrip() { if (!isEnable) { return; } if (isPressed) { return; } isPressed = true; HandStatus = MInputHandStatus.Grip; EventHandGrip.SendListener(HandIndex); }
private void OnDisable() { EventHandGrip.RemoveListener(OnGrip); EventHandIdle.RemoveListener(OnIdle); MSwitchManager.RemoveListener(OnSwitch); }
public void Start() { EventHandGrip.AddListener(OnButtonPress); EventHandIdle.AddListener(OnButtonRelease); EventHandUIRay.AddListener(OnUIRay); }