InformationPanelScript.cs 480 B

123456789101112131415161718
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class InformationPanelScript : MonoBehaviour
  6. {
  7. public Button quitButton;
  8. public Text currentPlayerText;
  9. // Start is called before the first frame update
  10. void Start() {
  11. quitButton.onClick.AddListener(() => { Application.Quit(); });
  12. }
  13. public void SetCurrentPlayer(string playerName) {
  14. currentPlayerText.text = playerName;
  15. }
  16. }