Snaparazzi/Assets/Scripts/PhoneLoop.cs
2024-01-27 19:58:02 +01:00

84 lines
1.6 KiB
C#

using UnityEngine;
public class PhoneLoop : MonoBehaviour
{
public GameObject homeConnection;
public GameObject WaitingRoom;
public GameObject BeforeStart;
public GameObject TakePicture;
public GameObject VotePicture;
public GameObject WaitingOtherPlayers;
public GameObject EndGame;
// Start is called before the first frame update
void Start()
{
homeConnection.SetActive(true);
}
// Update is called once per frame
void Update()
{
}
void ShowWaititngRoom()
{
homeConnection.SetActive(false);
WaitingRoom.SetActive(true);
}
void ShowBeforeStart()
{
WaitingRoom.SetActive(false);
BeforeStart.SetActive(true);
}
void ShowTakePicture()
{
BeforeStart.SetActive(false);
TakePicture.SetActive(true);
}
void showWaitingOtherPlayers()
{
if (TakePicture.activeInHierarchy)
{
TakePicture.SetActive(false);
}
if (VotePicture.activeInHierarchy)
{
VotePicture.SetActive(false);
}
WaitingOtherPlayers.SetActive(true);
}
void ShowVotePicture()
{
if (TakePicture.activeInHierarchy)
{
TakePicture.SetActive(false);
}
if (WaitingOtherPlayers.activeInHierarchy)
{
WaitingOtherPlayers.SetActive(false);
}
VotePicture.SetActive(true);
}
void ShowEndGame()
{
WaitingOtherPlayers.SetActive(false);
EndGame.SetActive(true);
}
[ContextMenu("Fake Player Connection")]
private void FakePlayerConnection()
{
}
}