using System.Collections; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; public class PhoneLoop : MonoBehaviour { [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; // 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() { } }