Example #1
0
 void handleWiimote(Google.Protobuf.VRCom.Update msg)
 {
     Google.Protobuf.VRCom.Wiimote wmsg = msg.Wiimote;
     Debug.Log(wmsg.ToString());
     if (wmsg.ButtonsPressed != 0)
     {
         Debug.Log("a button was pressed " + wmsg.ButtonsPressed);
     }
     if (wmsg.ButtonsReleased != 0)
     {
         Debug.Log("a button was released " + wmsg.ButtonsReleased);
     }
 }
Example #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (vrmsgCase_ == VrmsgOneofCase.Mocap)
            {
                hash ^= Mocap.GetHashCode();
            }
            if (vrmsgCase_ == VrmsgOneofCase.Hydra)
            {
                hash ^= Hydra.GetHashCode();
            }
            if (vrmsgCase_ == VrmsgOneofCase.Wiimote)
            {
                hash ^= Wiimote.GetHashCode();
            }
            hash ^= (int)vrmsgCase_;
            return(hash);
        }