public void Update()
    {
        if (m_PlayerConfig)
        {
            if (PlayerNameText)
            {
                PlayerNameText.text = m_PlayerConfig.Name;
            }

            if (PlayerAccentColorImage)
            {
                PlayerAccentColorImage.color = m_PlayerConfig.AccentColor;
            }

            if (m_Player.readyToBegin && m_LerpTargetEnd <= System.Single.MinValue)
            {
                m_LerpTargetEnd = Time.time + 0.3f;
            }
        }
        else if (m_Player)
        {
            m_PlayerConfig = m_Player.GetComponent <PlayerLobbyConfiguration>();
        }

        if (Time.time < m_LerpTargetEnd)
        {
            PlayerReadyOverlay.localScale = Vector3.Lerp(Vector3.one, new Vector3(14.0f, 1.0f, 1.0f), 1.0f - (m_LerpTargetEnd - Time.time) / 0.3f);
        }
    }
Ejemplo n.º 2
0
    public override bool OnLobbyServerSceneLoadedForPlayer(GameObject lobbyPlayer, GameObject gamePlayer)
    {
        PlayerLobbyConfiguration lobby = lobbyPlayer.GetComponent <PlayerLobbyConfiguration>();
        PlayerConfiguration      game  = gamePlayer.GetComponent <PlayerConfiguration>();

        game.PlayerName  = lobby.Name;
        game.PlayerColor = lobby.AccentColor;

        return(true);
    }
	public void Update()
	{
		if(m_PlayerConfig) {
			if(PlayerNameText) {
				PlayerNameText.text = m_PlayerConfig.Name;
			}

			if(PlayerAccentColorImage) {
				PlayerAccentColorImage.color = m_PlayerConfig.AccentColor;
			}

			if(m_Player.readyToBegin && m_LerpTargetEnd <= System.Single.MinValue) {
				m_LerpTargetEnd = Time.time + 0.3f;
			}
		} else if(m_Player) {
			m_PlayerConfig = m_Player.GetComponent<PlayerLobbyConfiguration>();
		}

		if(Time.time < m_LerpTargetEnd) {
			PlayerReadyOverlay.localScale = Vector3.Lerp(Vector3.one, new Vector3(14.0f, 1.0f, 1.0f), 1.0f - (m_LerpTargetEnd - Time.time)/0.3f);
		}
	}