public void LoadUser(SpawnedPlayer player)
 {
     ControllingPlayer = player;
     LeftCannons.ShootAxis = player.Info.ShootAxis1;
     RightCannons.ShootAxis = player.Info.ShootAxis2;
     Movement.HorizontalInput = player.Info.MoveXAxis;
     Movement.VerticalInput = player.Info.MoveYAxis;
     Flag.GetComponent<Renderer>().material.color = player.Info.SelectedColor;
 }
    public void SpawnPlayers()
    {
        _currentLevel = LevelSettings.Current;
        _players = new Dictionary<EndPoint, SpawnedPlayer>();

        foreach (RoomPlayerInfo player in ConnectedPlayers)
        {
            GameObject newShip = (GameObject)Instantiate(BoatPrefab, _currentLevel.SpawnPoints[player.SpawnPointID].position, Quaternion.identity);

            SpawnedPlayer sPlayer = new SpawnedPlayer(newShip, player);

            // Self
            if (player.PlayerID == PlayerID)
            {
                // Create camera for player
                GameObject cam = (GameObject)Instantiate(CameraPrefab, newShip.transform.position, Quaternion.identity);
                cam.GetComponent<CameraMovement>().Target = newShip.transform;

                _currentPlayer = sPlayer;

                _currentPlayer.Manager.PartChanged += AddPartUpdate;

                foreach (CannonManager group in _currentPlayer.Manager.CannonGroups)
                {
                    foreach (Cannon cannon in group.cannons)
                    {
                        cannon.OnShoot += Cannon_OnShoot;
                    }
                }

                UpdateNetworkPackage();
            }
            // Other player
            else
            {
                _players.Add(player.UdpEP, sPlayer);
                Destroy(newShip.GetComponent<Rigidbody>());
            }
        }
    }