示例#1
0
    private void UpStats()
    {
        if (you != null)
        {
            if (you.Name != "")
            {
                if (you.status.Count == 0)
                {
                    youstats.GetComponent <TextMesh>().text = "";
                    youstats.SetActive(false);
                }
                else
                {
                    youstats.SetActive(true);
                    youstats.GetComponent <TextMesh>().text = "";
                    for (int i = 0; i < you.status.Count; i++)
                    {
                        youstats.GetComponent <TextMesh>().text += you.PrintStatus(i);
                        youstats.GetComponent <TextMesh>().text += "\n";
                    }
                }
            }
            else
            {
                youstats.GetComponent <TextMesh>().text = "";
                youstats.SetActive(false);
            }
        }
        else
        {
            youstats.GetComponent <TextMesh>().text = "";
            youstats.SetActive(false);
        }

        if (opon != null)
        {
            if (opon.Name != "")
            {
                if (opon.status.Count == 0)
                {
                    oponstats.GetComponent <TextMesh>().text = "";
                    oponstats.SetActive(false);
                }
                else
                {
                    oponstats.SetActive(true);
                    oponstats.GetComponent <TextMesh>().text = "";
                    for (int i = 0; i < opon.status.Count; i++)
                    {
                        oponstats.GetComponent <TextMesh>().text += opon.PrintStatus(i);
                        oponstats.GetComponent <TextMesh>().text += "\n";
                    }
                }
            }
            else
            {
                oponstats.GetComponent <TextMesh>().text = "";
                oponstats.SetActive(false);
            }
        }
        else
        {
            oponstats.GetComponent <TextMesh>().text = "";
            oponstats.SetActive(false);
        }
    }
示例#2
0
    private void UpStats()
    {
        if (p1mon != null)
        {
            if (p1mon.Name != "")
            {
                if (p1mon.status.Count == 0)
                {
                    p1monstats.GetComponent <TextMesh>().text = "";
                    p1monstats.SetActive(false);
                }
                else
                {
                    p1monstats.SetActive(true);
                    p1monstats.GetComponent <TextMesh>().text = "";
                    for (int i = 0; i < p1mon.status.Count; i++)
                    {
                        p1monstats.GetComponent <TextMesh>().text += p1mon.PrintStatus(i);
                        p1monstats.GetComponent <TextMesh>().text += "\n";
                    }
                }
            }
            else
            {
                p1monstats.GetComponent <TextMesh>().text = "";
                p1monstats.SetActive(false);
            }
        }
        else
        {
            p1monstats.GetComponent <TextMesh>().text = "";
            p1monstats.SetActive(false);
        }

        if (p2mon != null)
        {
            if (p2mon.Name != "")
            {
                if (p2mon.status.Count == 0)
                {
                    p2monstats.GetComponent <TextMesh>().text = "";
                    p2monstats.SetActive(false);
                }
                else
                {
                    p2monstats.SetActive(true);
                    p2monstats.GetComponent <TextMesh>().text = "";
                    for (int i = 0; i < p2mon.status.Count; i++)
                    {
                        p2monstats.GetComponent <TextMesh>().text += p2mon.PrintStatus(i);
                        p2monstats.GetComponent <TextMesh>().text += "\n";
                    }
                }
            }
            else
            {
                p2monstats.GetComponent <TextMesh>().text = "";
                p2monstats.SetActive(false);
            }
        }
        else
        {
            p2monstats.GetComponent <TextMesh>().text = "";
            p2monstats.SetActive(false);
        }
    }