Exemple #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;
    }
    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);
        }
    }