예제 #1
0
    public void UpdateVariableWindow()
    {
        if (_processor != null)
        {
            foreach (Transform child in variableWindow)
            {
                if (child != variableTemplate.transform)
                {
                    Destroy(child.gameObject);
                }
            }

            var first = true;
            foreach (KeyValuePair <string, IScriptType> pair in _processor.CurrentScope.Variables)
            {
                TMP_Text tmpText = Instantiate(variableTemplate, variableWindow);
                tmpText.gameObject.SetActive(true);
                tmpText.text = $"{pair.Key}\n{IDEColorCoding.RunColorCode(pair.Value.ToString())}";
                tmpText.GetComponentInChildren <Image>().enabled = !first;
                if (first)
                {
                    first = false;
                }
            }
        }
    }
예제 #2
0
 public void KilledZombie()
 {
     eC.isDead = true;
     text.GetComponentInChildren <TMP_Text>();
     text.text = ZombiesAlive.ToString();
 }