// Update is called once per frame void Update() { r = new Rect((position.x + inset.x), (position.y + inset.y), size.x, size.y); if (action == null) { return; } if (isOver == 1) { action.DoMouseOver(); } else if (isOver >= 2) { action.DoMouseOut(); isOver = 0; } if (isClicking) { action.DoMouseDown(); isClicking = false; } if (kinectManager != null && kinectManager.kinectLaunched) { if (isKinectOver == 1) { action.DoMouseOver(); } else if (isKinectOver == -1) { action.DoMouseOut(); isKinectOver = 0; } if (isKinectClicking) { action.DoMouseDown(); isKinectClicking = false; } } }
// Update is called once per frame void Update() { if (action == null) { return; } if (isOver == 1) { action.DoMouseOver(); } else if (isOver >= 2) { action.DoMouseOut(); isOver = 0; } if (isClicking) { action.DoMouseDown(); isClicking = false; } }