using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; public class OnlineGameScript : MonoBehaviour { // Status color Pending, not your turn, your turn, declined List statusColors = new List() { new Color32(234, 164, 17, 100), new Color32(255, 255, 24, 175), new Color32(0, 255, 0, 100), new Color32(219, 12, 65, 100), new Color32(12,12,219,150) }; public Text gameStatusText; public Text gameTitleText; private int id; private int winNumber; private int answerTimer; private int roundTimeLimit; private string currentPlayer; private int round; private string startDate; private string LastPlayedDate; private string finishedDate; private List> playerInfos; public int GetId() { return id; } public void SetId(int value) { id = value; } public int WinNumber { get => winNumber; set => winNumber = value; } public int AnswerTimer { get => answerTimer; set => answerTimer = value; } public int RoundTimeLimit { get => roundTimeLimit; set => roundTimeLimit = value; } public string CurrentPlayer { get => currentPlayer; set => currentPlayer = value; } public int Round { get => round; set => round = value; } public string StartDate { get => startDate; set => startDate = value; } public string LastPlayedDate1 { get => LastPlayedDate; set => LastPlayedDate = value; } public string FinishedDate { get => finishedDate; set => finishedDate = value; } public string GameStatus { get { return gameStatus; } set { gameStatus = value; SetColor(gameStatus); //SetGameStatusText(); } } public List> PlayerInfos { get => playerInfos; set => playerInfos = value; } private string PENDING_TITLE = "ONLINE_GAME_STATUS_TITLE_VALUE_PENDING"; private string ACTIVE_TITLE = "ONLINE_GAME_STATUS_TITLE_ACTIVE"; private string PENDING = "ONLINE_GAME_STATUS_PENDING"; private string DECLINED = "ONLINE_GAME_STATUS_DECLINED"; private string ACTIVE = "ONLINE_GAME_STATUS_ACTIVE"; private string INVITED = "ONLINE_GAME_STATUS_INVITED"; private string OTHERS_TURN = "ONLINE_GAME_STATUS_OTHERS_TURN"; private string YOUR_TURN = "ONLINE_GAME_STATUS_YOUR_TURN"; // behövs nog en partialy declined status också, om en av fyra tackar nej kanske man viss spela ändå. // behövs också en med dina inbjudningar. private Button gameInfoButton; private void Start() { gameInfoButton = this.GetComponent