示例#1
0
 public override void ToUI()
 {
     varName      = var.GetText();
     initialvalue = initial.text;
     operation    = var.GetText() + " " + op.text + " " + end.text;
     uiText.text  = operation;
 }
示例#2
0
    public override string ToCode()
    {
        string varName    = var.GetText();
        string doubleText = "if(_Dinputs.Count > _j)" + varName + " = _Dinputs[_j++];";
        string intText    = "if(_inputs.Count > _i)" + varName + " =  _inputs[_i++];";

        return((var.type == VariableManager.Type.Int) ? intText : doubleText);
    }
示例#3
0
 private void Start()
 {
     op    = window.transform.Find("Panel/Content/Operation").GetComponent <TextMeshProUGUI>();
     _var  = window.transform.Find("Panel/Content/var_vet_mat").GetComponent <Var_Vet_Mat>();
     oldOp = op.text;
     var   = _var.GetText();
 }
示例#4
0
 public string GetActiveText()
 {
     if (!TMPinput.interactable)
     {
         return(vvm.GetText());
     }
     else
     {
         return(TMPinput.text);
     }
 }
示例#5
0
 public override void UpdateUI(bool isOk)
 {
     if (isOk)
     {
         oldOp = op.text;
         var   = _var.GetText();
         ToUI();
     }
     else
     {
         op.text = oldOp;
     }
 }
示例#6
0
    public override string ToCode()
    {
        string BlocoCode = "while(" + var.GetText() + op.text + val.GetActiveText() + "){ if(_loopLimit >= 100000){_loopError = \"Seus loops rodaram além do limite permitido pelo Mazecode\"; return;} else {_loopLimit += 1;}";

        return(BlocoCode);
    }
示例#7
0
 public override void ToUI()
 {
     varName     = var.GetText();
     uiText.text = varName;
 }
示例#8
0
    public override string ToCode()
    {
        string BlocoCode = "if( " + var.GetText() + op.text + val.GetActiveText() + " ){";

        return(BlocoCode);
    }
示例#9
0
 public override string ToCode()
 {
     return("if(_output.Length >= 1000000) {_loopError = \"Sua saída possui muitos caracteres, por favor, confira os loops da sua solução. \"; return;}_output += " + var.GetText() + "+ \" \";");
 }
示例#10
0
    public override string ToCode()
    {
        string BlocoCode = var.GetText() + " = " + val.GetActiveText() + op.text + val2.GetActiveText() + ";";

        return(BlocoCode);
    }
示例#11
0
    public override string ToCode()
    {
        string BlocoCode = "for(" + var.GetText() + " = " + initial.text + " ;" + var.GetText() + "<=" + end.text + ";" + var.GetText() + op.text + "){ if(_loopLimit >= 100000){_loopError = \"Seus loops rodaram além do limite permitido pelo Mazecode\"; return;} else {_loopLimit += 1;}";

        return(BlocoCode);
    }