public HandHandler() { ClientType clientType = Properties.Settings.Default.ClientType; ButtonCodes.SetType(clientType); if (clientType == ClientType.Custom) { buttonSender = new ButtonSender(Properties.Settings.Default.ClientType); } else { if (clientType == ClientType.XBMC) { buttonSender = new ButtonSender(Properties.Settings.Default.ClientType, Properties.Settings.Default.IpAddress, 9777); } else if (clientType == ClientType.Boxee) { buttonSender = new ButtonSender(Properties.Settings.Default.ClientType, Properties.Settings.Default.IpAddress, 9770); } buttonSender.SendNotification("KinEmote v0.3", "Hand Detected, tracking started."); } lastDirection = Direction.Illegal; handMode = HandMode.Normal; lastPoint = new Point(1, 2); intervalTimer = new Timer(); intervalTimer.Elapsed += new ElapsedEventHandler(intervalTimer_Elapsed); }
public void SetMode(HandMode g_newMode) { myMode = g_newMode; Sprite t_sprite = null; switch (g_newMode) { case HandMode.Copy: t_sprite = CS_VR_Settings.Instance.myHandModeSprite_Copy; break; case HandMode.Delete: t_sprite = CS_VR_Settings.Instance.myHandModeSprite_Delete; break; } myModeDisplay.ChangeSprite(t_sprite); }
public void HandlePush(Direction pushDirection) { if (handMode == HandMode.Normal) { if (pushDirection == Direction.Forward) { buttonSender.SendKey(ButtonCodes.MidPush); } else { intervalTimer.Stop(); buttonSender.SendNotification("KinEmote v0.3", "Hand moved to back plane."); handMode = HandMode.BackPlane; } } else { handMode = HandMode.Normal; buttonSender.SendNotification("KinEmote v0.3", "Hand moved to mid plane."); } }
public HandInfo(GameObject g_prefab, Hand g_hand) { myHand = g_hand; myMode = HandMode.Edit; myModeDisplay = Instantiate(g_prefab).GetComponent <CS_VR_HandModeDisplay> (); }
public void OnButtonHandMode(Hand g_hand, HandMode g_mode) { myHandModeDictionary [g_hand].SetMode(g_mode); }