Inheritance: MonoBehaviour
Esempio n. 1
0
        void FillLogItem(object data, UIReferences refer)
        {
            GLog.LogItem item = data as GLog.LogItem;
            Text         txt  = refer.Get("Text") as Text;
            Image        img  = refer.Get(1) as Image;
            Button       btn  = refer.Get(2) as Button;

            txt.text    = item.ToString();
            img.enabled = showingLogs.IndexOf(item) % 2 == 0;
            btn.AddClickEvent(() => {
            });
            if (item.logType == LogType.Log)
            {
                txt.color = color_info;
            }
            else if (item.logType == LogType.Warning)
            {
                txt.color = color_warn;
            }
            else if (item.logType == LogType.Error)
            {
                txt.color = color_error;
            }
            else
            {
                txt.color = color_info;
            }
        }
Esempio n. 2
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(this);
        }

        gameInterface = GameObject.Find("GameManager").GetComponent <MatchMaking>().inGamePanel;
        uiReferences  = gameInterface.GetComponent <UIReferences>();

        endTurnButton   = uiReferences.endTurnButton;
        turnNumberText  = uiReferences.turnNumberText.GetComponent <Text>();
        playerActivText = uiReferences.playerActivText.GetComponent <Text>();

        if (PhotonNetwork.PlayerList.Length <= 1)
        {
            debugMode = true;
        }
        else
        {
            debugMode = false;
        }
    }
Esempio n. 3
0
 void OnEnable()
 {
     refers = (UIReferences)target;
 }