ClientServer/Client/Assets/Scripts/Util/TestServerLobbyText.cs

39 lines
948 B
C#
Raw Normal View History

2025-09-06 17:17:39 +04:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class TestServerLobbyText : MonoBehaviour
{
public static TestServerLobbyText Instance;
private TextMeshPro welcomeText;
private void Awake()
{
Instance = this;
welcomeText = GetComponent<TextMeshPro>();
welcomeText.gameObject.SetActive(false);
}
public void SetWelcomeText(string message, bool isLiveServer, bool isTestServer, bool isLocalServer)
{
if (isLiveServer)
{
welcomeText.gameObject.SetActive(false);
}
else if (isTestServer)
{
welcomeText.gameObject.SetActive(true);
welcomeText.SetText("Welcome To \n Test Server!");
}
else if (isLocalServer)
{
welcomeText.gameObject.SetActive(true);
welcomeText.SetText("Welcome To \n Local Server!");
}
}
}