示例#1
0
 public DinoParams(int id, string name, AIType atype, DinoData ddata, ManageGame m)
 {
     playerid   = id;
     playername = name;
     type       = atype;
     data       = ddata;
     mgmt       = m;
 }
示例#2
0
    //add message to message queue
    public void AddMessage(string t, DinoData d)
    {
        MessageParams m = new MessageParams();

        m.SetText(t);

        if (d != null)
        {
            m.SetColor(d);
        }
        messages.Add(m);
    }
示例#3
0
 public void SetColor(DinoData data)
 {
     if (data == null)
     {
         panelcolor = Color.black;
         textcolor  = Color.white;
     }
     else
     {
         panelcolor = data.primarycolor;
         textcolor  = data.textcolor;
     }
 }
示例#4
0
 //recolors UI objects based on DinoData
 void SetColors(DinoData data)
 {
     backpanel.color = data.primarycolor;
     playerName.GetComponentInChildren <Image>().color = data.secondarycolor;
     playerPortrait.GetComponent <Image>().sprite      = data.portrait;
     teeth.GetComponent <Image>().color = data.tertiarycolor;
     try
     {
         playerName.GetComponentInChildren <TMP_SubMeshUI>().material.color = data.textcolor;
         scoreText.GetComponentInChildren <TMP_SubMeshUI>().material.color  = data.textcolor;
         scoreTitle.GetComponentInChildren <TMP_SubMeshUI>().material.color = data.textcolor;
     }
     catch (System.Exception e)
     {
         Debug.Log("Error: " + e);
     }
 }