Exemplo n.º 1
0
        private void SyncronizeRotation()
        {
            UpdateRotationRequest req = new UpdateRotationRequest(this.identity.GetNetworkID(), this.identity.GetEntityType(), this.transform.rotation.eulerAngles);

            NetworkManager.instance.GetSocket().Emit("Packet::UpdateRotationRequest", JSONObject.Create(JsonUtility.ToJson(req)));
        }
Exemplo n.º 2
0
        private void EntityRotate(SocketIOEvent e)
        {
            UpdateRotationRequest req = JsonUtility.FromJson <UpdateRotationRequest>(e.data.ToString());

            GameManager.instance.EntityRotated(req.entityId, new Vector3(float.Parse(req.x), float.Parse(req.y), float.Parse(req.z)));
        }