12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- 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
- }
- }
|