Petition-to-the-Gods-V3/Assets/Scripts/Server/ServerGamePanel.cs
2025-11-19 12:30:07 +08:00

58 lines
1.3 KiB
C#

using System;
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class ServerGamePanel : MonoBehaviour
{
public static ServerGamePanel Instance;
public static string nameOfTheGameWillBeOpened = string.Empty;
private void Awake()
{
Instance = this;
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
gameOpen();
}
public void gameOpen()
{
if (ServerWorkSceneController.Instance == null)
{
return;
}
switch (nameOfTheGameWillBeOpened)
{
case "talking":
ServerWorkSceneController.Instance.processStep(14);
break;
case "typing":
ServerWorkSceneController.Instance.processStep(15);
break;
case "sticks":
ServerWorkSceneController.Instance.processStep(16);
break;
}
nameOfTheGameWillBeOpened = "";
}
IEnumerator LoadNextScene(string sceneName)
{
yield return new WaitForSeconds(0f);
SceneManager.LoadScene(sceneName);
}
// Update is called once per frame
void Update()
{
}
}