protected virtual void OnReceiveGyroscope(NetworkMessage netMsg)
        {
            GyroMessage msg = netMsg.ReadMessage <GyroMessage> ();

            this.gyro.attitude             = msg.attitude;
            this.gyro.enabled              = msg.enabled;
            this.gyro.gravity              = msg.gravity;
            this.gyro.rotationRate         = msg.rotationRate;
            this.gyro.rotationRateUnbiased = msg.rotationRateUnbiased;
            this.gyro.updateInterval       = msg.updateInterval;
            this.gyro.userAcceleration     = msg.userAcceleration;
        }
Beispiel #2
0
        protected virtual void SendGyroscope(Gyroscope gyro)
        {
            // send gyroscope data
            GyroMessage msg = new GyroMessage();

            msg.attitude             = gyro.attitude;
            msg.enabled              = gyro.enabled;
            msg.rotationRate         = gyro.rotationRate;
            msg.rotationRateUnbiased = gyro.rotationRateUnbiased;
            msg.updateInterval       = gyro.updateInterval;
            msg.userAcceleration     = gyro.userAcceleration;
            this.Client.Send(InputMsgType.Gyroscope, msg);
        }