Exemplo n.º 1
0
        public Ball SpawnBall(Data.PlayerType playerType, ControlType ctrlType, int character, string nickname, NetworkConnection con)        // aqui doy especificaciones del personaje
        {
            if (lobbyPlatform)
            {
                lobbyPlatform.Activate();
            }
            else
            {
                Debug.LogError("LobbyBallSpawner has no lobby platform assigned");
            }

            if (NetworkManager.singleton.isNetworkActive)
            {
                GameObject.Find("SanicNetworkManager").GetComponent <SanicNetworkManager>().tipo = BallType.LobbyPlayer;

                GameObject.Find("SanicNetworkManager").GetComponent <SanicNetworkManager>().controlTipo = ctrlType;

                GameObject.Find("SanicNetworkManager").GetComponent <SanicNetworkManager>().personaje = character;

                GameObject.Find("SanicNetworkManager").GetComponent <SanicNetworkManager>().nickName = nickname;

                return(SpawnBallMultiplayer(transform.position, transform.rotation, BallType.LobbyPlayer, ctrlType, character, nickname, con));
            }
            else
            {
                return(SpawnBallLocal(transform.position, transform.rotation, BallType.LobbyPlayer, ctrlType, character, nickname));
            }
        }
        public BallLocal SpawnBall(Data.PlayerType playerType, ControlType ctrlType, int character, string nickname)
        {
            if (lobbyPlatform)
            {
                lobbyPlatform.Activate();
            }
            else
            {
                Debug.LogError("LobbyBallSpawner has no lobby platform assigned");
            }

            return(SpawnBall(transform.position, transform.rotation, BallType.LobbyPlayer, ctrlType, character, nickname));
        }