Ejemplo n.º 1
0
    public override void OnLobbyServerSceneLoadedForPlayer(NetworkManager manager, GameObject lobbyPlayer, GameObject gamePlayer)
    {
        LobbyPlayer lobby    = lobbyPlayer.GetComponent <LobbyPlayer>();//get the script in lobbyPlayer gameobject
        TankLoad    tankLoad = gamePlayer.GetComponent <TankLoad>();

        tankLoad.color      = lobby.playerColor;
        tankLoad.playerName = lobby.playerName;
    }
Ejemplo n.º 2
0
    private void Start()
    {
        m_ExplosionParticles = Instantiate(m_ExplosionPrefab).GetComponent <ParticleSystem>();
        m_ExplosionAudio     = m_ExplosionParticles.GetComponent <AudioSource>();

        m_ExplosionParticles.gameObject.SetActive(false);
        tankLoad = GetComponent <TankLoad>();
        if (!isLocalPlayer)
        {
            infoPanel.SetActive(false);
        }
    }