2024-01-27 12:43:40 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
2024-01-27 15:25:53 +00:00
|
|
|
using Unity.VisualScripting;
|
2024-01-27 12:43:40 +00:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class PhoneLoop : MonoBehaviour
|
|
|
|
{
|
2024-01-27 15:25:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
[SerializeField]
|
|
|
|
public GameObject homeConnection;
|
|
|
|
[SerializeField]
|
|
|
|
public GameObject WaitingRoom;
|
|
|
|
[SerializeField]
|
|
|
|
public GameObject BeforeStart;
|
|
|
|
[SerializeField]
|
|
|
|
public GameObject TakePicture;
|
|
|
|
[SerializeField]
|
|
|
|
public GameObject VotePicture;
|
|
|
|
[SerializeField]
|
|
|
|
public GameObject WaitingOtherPlayers;
|
|
|
|
[SerializeField]
|
|
|
|
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 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()
|
|
|
|
{
|
|
|
|
WaitingOtherPlayers.SetActive(false) ;
|
|
|
|
EndGame.SetActive(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ContextMenu("Fake Player Connection")]
|
|
|
|
private void FakePlayerConnection()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-27 12:43:40 +00:00
|
|
|
}
|