using System; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.EventSystems; public class jatekmanager : MonoBehaviour { public static jatekmanager Instance; //game objectek implementálása public GameObject energiafejlesztes; private Button energiafejlesztesgomb; public GameObject akciofejlesztes; private Button akciofejlesztesgomb; public GameObject harcfejlesztes; private Button harcfejlesztesgomb; public GameObject ujradobasfejlesztes; private Button ujradobasfejlesztesgomb; public GameObject hackfejlesztes; private Button hackfejlesztesgomb; public GameObject kovetkezokor; private Button kovetkezokorgomb; public GameObject betarazas; private Button betarazasgomb; public GameObject nyomozas; private Button nyomozasgomb; public GameObject hackeles; private Button hackelesgomb; public GameObject rolldice; private Button rolldicegomb; public GameObject test; private Button testgomb; //script-ek implementalasa private Elet elet; private Akciok akciok; private Targyak targyak; private Dice dice; private Upgrade upgrade; private Akciopont akciopont; private movement movement; private TurnManager turnManager; private Source source; private vegpontozas vegpontozas; private AudioManager audioManager; //ügynökcsapatok implementálása public TMP_Text[] oneone; public TMP_Text[] twoone; public TMP_Text[] threeone; public TMP_Text[] onetwo; public TMP_Text[] twotwo; public TMP_Text[] threetwo; public TMP_Text[] onethree; public TMP_Text[] twothree; public TMP_Text[] threethree; public TMP_Text[] onefour; public TMP_Text[] twofour; public TMP_Text[] threefour; //nyert es vesztett bool lethrehozas public bool jatekosnyert = false; public bool jatekosvesztett = false; public bool vanertelme = true; public GameState State; public static event Action OnGameStateChanged; public Button helyszinaktivalasBtn; public GameObject pauseMenuUI; public static bool GameIsPlaying = true; private GameState previousGameState; public TMP_Text nev; public GameObject mainCanvas; public GameObject helyszinCanvas; public GameObject helyszinSorsolasCanvas; public GameObject palyaSprite; public GameObject playerSprite; private void Awake() { Instance = this; mainCanvas.SetActive(false); //helyszin sorsolas animacio miatt helyszinCanvas.SetActive(false); helyszinSorsolasCanvas.SetActive(true); palyaSprite.SetActive(false); playerSprite.SetActive(false); } private void Start() { elet = FindObjectOfType(); akciok = FindObjectOfType(); targyak = FindObjectOfType(); dice = FindObjectOfType(); upgrade = FindObjectOfType(); akciopont = FindObjectOfType(); movement = FindObjectOfType(); turnManager = FindObjectOfType(); source = FindObjectOfType(); vegpontozas = FindObjectOfType(); energiafejlesztesgomb = energiafejlesztes.GetComponent