Snaparazzi/Assets/Scripts/PhoneLoop.cs

84 lines
1.6 KiB
C#
Raw Permalink Normal View History

2024-01-27 12:43:40 +00:00
using UnityEngine;
public class PhoneLoop : MonoBehaviour
{
2024-01-27 15:25:53 +00:00
public GameObject homeConnection;
public GameObject WaitingRoom;
public GameObject BeforeStart;
public GameObject TakePicture;
public GameObject VotePicture;
public GameObject WaitingOtherPlayers;
public GameObject EndGame;
2024-01-27 12:43:40 +00:00
// Start is called before the first frame update
void Start()
{
2024-01-27 15:25:53 +00:00
homeConnection.SetActive(true);
2024-01-27 12:43:40 +00:00
}
// Update is called once per frame
void Update()
{
2024-01-27 18:58:02 +00:00
2024-01-27 12:43:40 +00:00
}
2024-01-27 15:25:53 +00:00
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()
{
2024-01-27 18:58:02 +00:00
WaitingOtherPlayers.SetActive(false);
2024-01-27 15:25:53 +00:00
EndGame.SetActive(true);
}
[ContextMenu("Fake Player Connection")]
private void FakePlayerConnection()
{
2024-01-27 18:58:02 +00:00
}
2024-01-27 12:43:40 +00:00
}