示例#1
0
        UpdateText()
        {
            string ToDisplay_ = GetLogTag();

            if (IsLiving())
            {
                ToDisplay_ += "; Living";
            }
            else
            {
                ToDisplay_ += "; Dead";
            }

            // if (globalManager.isTurnBasedGame()) {
            //     if (TurnState == TurnStates.NotTurn) {
            //         ToDisplay_ += "; NotTurn";
            //     } else if (TurnState == TurnStates.Switching) {
            //         ToDisplay_ += "; Switching";
            //     } else if (TurnState == TurnStates.Turn) {
            //         ToDisplay_ += "; Turn (" + globalManager.getTurnPercentage().ToString("F2") + ")";
            //     }
            // }

            UITexts["Status"].setColor(globalManager.getStateTextColor(IsLiving()));
            UITexts["Status"].setText(ToDisplay_);
        }
        UpdateText()
        {
            string ToDisplay_ = GetLogTag();

            if (IsLiving())
            {
                ToDisplay_ += "; Living";
            }
            else
            {
                ToDisplay_ += "; Dead";
            }

            // if (globalManager.isTurnBasedGame()) {
            //     if (TurnState == TurnStates.NotTurn) {
            //         ToDisplay_ += "; NotTurn";
            //     } else if (TurnState == TurnStates.Switching) {
            //         ToDisplay_ += "; Switching";
            //     } else if (TurnState == TurnStates.Turn) {
            //         ToDisplay_ += "; Turn (" + globalManager.getTurnPercentage().ToString("F2") + ")";
            //     }
            // }

            foreach (Dictionary <string, UIText> UITexts in AllAgentCamerasUITexts)
            {
                UITexts["Status"].setColor(globalManager.getStateTextColor(IsLiving()));
                UITexts["Status"].setText(
                    ToDisplay_ + " (" + UITexts["Status"].GetComponentInParent <AgentCamera>().ID + ")");
            }
        }
        UpdateText()
        {
            string ToDisplay_   = getLogTag();
            Text   DisplayText_ = GetComponentInChildren <Canvas>().GetComponentInChildren <Text>();

            DisplayText_.color = globalManager.getStateTextColor(isLiving());

            if (isLiving())
            {
                ToDisplay_ += "; Living";
            }
            else
            {
                ToDisplay_ += "; Dead";
            }

            if (globalManager.isTurnBasedGame())
            {
                if (TurnState == TurnStates.NotTurn)
                {
                    ToDisplay_ += "; NotTurn";
                }
                else if (TurnState == TurnStates.Switching)
                {
                    ToDisplay_ += "; Switching";
                }
                else if (TurnState == TurnStates.Turn)
                {
                    ToDisplay_ += "; Turn (" + globalManager.getTurnPercentage().ToString("F2") + ")";
                }
            }

            DisplayText_.text     = ToDisplay_;
            DisplayText_.fontSize = (int)(47f / 0.5f * globalManager.getViewPortSize(ViewAxis.X));
        }