コード例 #1
0
    public string GetText()
    {
        string text = this.transform.GetChild(1).GetComponentInChildren <TextMeshProUGUI>().text;

        switch (state)
        {
        case VariableManager.StructureType.Array:
            return(text + "[" + vet.GetActiveText() + "]");

        case VariableManager.StructureType.Matriz:
            return(text + "[" + vet.GetActiveText() + "]" + "[" + mat.GetActiveText() + "]");

        case VariableManager.StructureType.Variable:
            return(text);
        }
        return(null);
    }
コード例 #2
0
    public void OnButtonPressed()
    {
        string sendText = varName.text;

        if (vet.gameObject.activeSelf)
        {
            sendText = sendText + vet.GetActiveText();
        }
        if (mat.gameObject.activeSelf)
        {
            sendText = sendText + mat.GetActiveText();
        }
        pad.InsertToOperation(sendText);
    }