コード例 #1
0
    private void UpdateUserPosition(NetworkMessage netMsg)
    {
        UserPositionMessage msg = netMsg.ReadMessage <UserPositionMessage>();

        player.position = msg.userPosition;
        player.rotation = msg.userRotation;
    }
コード例 #2
0
    private void SendPlayerPosUpdate()
    {
        UserPositionMessage userPositionMessage = new UserPositionMessage()
        {
            userPosition = player.position,
            userRotation = player.rotation
        };

        SendMessageToAllClientReady(VirtualHausMessageTypes.USER_POSITION, userPositionMessage);
    }