using System; using UnityEngine; public abstract class AVRControllerButtons : MonoBehaviour { protected virtual void Awake() { if (base.gameObject.name.ToLower().Contains("left")) { this.m_bHandL = true; } else if (base.gameObject.name.ToLower().Contains("right")) { this.m_bHandL = false; } } public AVRControllerButtons.TYPE Type { get { return this.m_eType; } } public virtual bool HandSide { get { return this.m_bHandL; } set { this.m_bHandL = value; } } public abstract bool ShowHand { get; set; } public abstract void Haptic(byte f_byFoce, float f_fTime); public abstract bool GetPressDown(AVRControllerButtons.BTN f_eBtn); public abstract bool GetPress(AVRControllerButtons.BTN f_eBtn); public abstract bool GetPressUp(AVRControllerButtons.BTN f_eBtn); public abstract bool GetTouchDown(AVRControllerButtons.TOUCH f_eTouch); public abstract bool GetTouch(AVRControllerButtons.TOUCH f_eTouch); public abstract bool GetTouchUp(AVRControllerButtons.TOUCH f_eTouch); public abstract Vector2 GetAxis(); public abstract float GetTriggerRate(); protected bool m_bHandL = true; protected AVRControllerButtons.TYPE m_eType = AVRControllerButtons.TYPE.TOUCH; public enum BTN { VIRTUAL_MENU, VIRTUAL_L_CLICK, VIRTUAL_R_CLICK, VIRTUAL_GRUB, MENU, TRIGGER, STICK_PAD, GRIP, MAX } public enum TOUCH { TRIGGER, STICK_PAD, REST, YB, XA, MAX } public enum TYPE { NON_DUMMY, TOUCH, VIVE } }