using System;
using System.Collections;
using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine;

public class UIManager : MonoBehaviour {
  [Header(" Panels ")]
  [SerializeField] private GameObject connPannel;
  [SerializeField] private GameObject waitPannel;
  [SerializeField] private GameObject gamePannel;
  // Start is called before the first frame update
  void Start() {
    ShowConnPannel();
  }
  private void showPannels(bool c, bool w, bool g) {
    connPannel.SetActive(c);
    waitPannel.SetActive(w);
    gamePannel.SetActive(g);
  }
  private void ShowConnPannel() {
    showPannels(true, false, false);
  }
  private void ShowWaitPannel() {
    showPannels(false, true, false);
  }
  private void ShowGamePannel() {
    showPannels(false, false, true);
  }
  public void HostButtonCallback() {
    NetworkManager.Singleton.StartHost();
    ShowWaitPannel();
  }
  public void ClientButtonCallback() {
    NetworkManager.Singleton.StartClient();
    ShowWaitPannel();
  }
}
