public void Setup() { playerIconsHandler = GetComponent <PlayerIconsHandler>(); visualizer = GetComponent <Visualizer>(); backButton.gameObject.SetActive(false); visualizer.dice.gameObject.SetActive(false); visualizer.playersData = new PlayerData[4]; SetPlayersData(); gameGUIMaker = new GameGUIMaker(visualizer); // please choose your players visualizer.dialogBox.Popup(".ﻦﮐ ﺏﺎﺨﺘﻧﺍ ﻭﺭ ﻥﺎﻨﮑﯾﺯﺎﺑ"); }
public void Setup() { PlayerType[] playerTypes = new PlayerType[playersData.Length]; for (int i = 0; i < playersData.Length; i++) { playerTypes[i] = playersData[i].type; } board = new Board(4, 40, 4); game = new Game(board, playerTypes); activePlayer = playersData[0]; gameObject.AddComponent(typeof(EventListenersManager)); playerIconsHandler = GetComponent <PlayerIconsHandler>(); dice.gameObject.SetActive(true); game.Start(); }