Example #1
0
 public override void ToUI()
 {
     varName      = var.GetText();
     initialvalue = initial.text;
     operation    = var.GetText() + " " + op.text + " " + end.text;
     uiText.text  = operation;
 }
Example #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);
    }
Example #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();
 }
Example #4
0
 public string GetActiveText()
 {
     if (!TMPinput.interactable)
     {
         return(vvm.GetText());
     }
     else
     {
         return(TMPinput.text);
     }
 }
Example #5
0
 public override void UpdateUI(bool isOk)
 {
     if (isOk)
     {
         oldOp = op.text;
         var   = _var.GetText();
         ToUI();
     }
     else
     {
         op.text = oldOp;
     }
 }
Example #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);
    }
Example #7
0
 public override void ToUI()
 {
     varName     = var.GetText();
     uiText.text = varName;
 }
Example #8
0
    public override string ToCode()
    {
        string BlocoCode = "if( " + var.GetText() + op.text + val.GetActiveText() + " ){";

        return(BlocoCode);
    }
Example #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() + "+ \" \";");
 }
Example #10
0
    public override string ToCode()
    {
        string BlocoCode = var.GetText() + " = " + val.GetActiveText() + op.text + val2.GetActiveText() + ";";

        return(BlocoCode);
    }
Example #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);
    }