/** Updates the graphics HandRepresentations. */ protected virtual void Update() { if (((isServer || isClient) && (Server != isServer)) || Provider.CurrentFrame.Hands.Count == 0) { return; } if (_counter == 0) { _lastFrame = Compression.ConvertToBytes(Provider.CurrentFrame.Hands); } if (!isServer) { if (_counter == 0) { byte[] rv = new byte[_lastFrame.Length / 2]; System.Buffer.BlockCopy(_lastFrame, 0, rv, 0, _lastFrame.Length / 2 * sizeof(byte)); CmdHandRep(rv); } else { byte[] rv = new byte[_lastFrame.Length - (_lastFrame.Length / 2)]; System.Buffer.BlockCopy(_lastFrame, _lastFrame.Length / 2 * sizeof(byte), rv, 0, (_lastFrame.Length - (_lastFrame.Length / 2)) * sizeof(byte)); CmdHandRep2(rv); } } /*else * { * if (_counter == 0) * { * byte[] rv = new byte[_lastFrame.Length / 2]; * System.Buffer.BlockCopy(_lastFrame, 0, rv, 0, _lastFrame.Length / 2*sizeof(byte)); * RpcHandRep(rv); * } * else * { * byte[] rv = new byte[_lastFrame.Length - (_lastFrame.Length / 2)]; * System.Buffer.BlockCopy(_lastFrame, _lastFrame.Length / 2 * sizeof(byte), rv, 0, (_lastFrame.Length - (_lastFrame.Length / 2))*sizeof(byte)); * RpcHandRep2(rv); * } * }*/ }