Beispiel #1
0
        public override string GetRichName()
        {
            var setCode = "=";

            switch (setType)
            {
            case SetType.Add:
                setCode = "+=";
                break;

            case SetType.Divide:
                setCode = "/=";
                break;

            case SetType.Subtract:
                setCode = "-=";
                break;

            case SetType.Multiply:
                setCode = "*=";
                break;

            case SetType.Modulo:
                setCode = "%=";
                break;
            }
            return($"{target.GetNicelyDisplayName(richName:true)} {setCode} {value.GetNicelyDisplayName(richName:true)}");
        }
Beispiel #2
0
        public override string GetRichName()
        {
            string separator = null;

            switch (operatorType)
            {
            case ComparisonType.Equal:
                separator = " == ";
                break;

            case ComparisonType.GreaterThan:
                separator = " > ";
                break;

            case ComparisonType.GreaterThanOrEqual:
                separator = " >= ";
                break;

            case ComparisonType.LessThan:
                separator = " < ";
                break;

            case ComparisonType.LessThanOrEqual:
                separator = " <= ";
                break;

            case ComparisonType.NotEqual:
                separator = " != ";
                break;
            }
            return(targetA.GetNicelyDisplayName(richName: true) + separator + targetB.GetNicelyDisplayName(richName: true));
        }
Beispiel #3
0
 public override string GetRichName()
 {
     if (isPrefix)
     {
         if (isDecrement)
         {
             return("--" + target.GetNicelyDisplayName(richName: true));
         }
         return("++" + target.GetNicelyDisplayName(richName: true));
     }
     if (isDecrement)
     {
         return(target.GetNicelyDisplayName(richName: true) + "--");
     }
     return(target.GetNicelyDisplayName(richName: true) + "++");
 }
Beispiel #4
0
 public override string GetRichName()
 {
     if (returnValue.isAssigned && returnValue.type != typeof(void))
     {
         return(base.GetRichName() + " " + returnValue.GetNicelyDisplayName(richName: true));
     }
     return(base.GetRichName());
 }
Beispiel #5
0
 public override string GetRichName()
 {
     if (condition.isAssigned)
     {
         return($"If: {condition.GetNicelyDisplayName(richName:true)}");
     }
     return(base.GetRichName());
 }
Beispiel #6
0
        public override string GetRichName()
        {
            string length = null;

            if (arrayLength.isAssigned)
            {
                length = arrayLength.GetNicelyDisplayName(richName: true);
            }
            return($"{uNodeUtility.WrapTextWithKeywordColor("new")} {elementType.GetNicelyDisplayName(typeTargetWithTypeof:false)}[{length}] ( {string.Join(", ", from val in values select val.GetNicelyDisplayName(richName: true))} )");
        }
Beispiel #7
0
 public override string GetRichName()
 {
     return(CodeGenerator.GetOperatorCode(targetA.GetNicelyDisplayName(richName: true), targetB.GetNicelyDisplayName(richName: true), operatorType));
 }
Beispiel #8
0
 public override string GetRichName()
 {
     if (!startIndex.isAssigned || !iteratorSetValue.isAssigned || !indexType.isAssigned || !compareNumber.isAssigned)
     {
         return(base.GetRichName());
     }
     return($"{uNodeUtility.WrapTextWithKeywordColor("for")}({uNodeUtility.GetNicelyDisplayName(indexType, typeTargetWithTypeof:false)} i={startIndex.GetNicelyDisplayName(richName:true)}; {CodeGenerator.GenerateCompareCode("i", compareNumber.GetNicelyDisplayName(richName:true), compareType)}; {CodeGenerator.GenerateSetCode("i", iteratorSetValue.GetNicelyDisplayName(richName:true), iteratorSetType).RemoveSemicolon()})");
 }
Beispiel #9
0
 public override string GetRichName()
 {
     return($"Cache Value: {target.GetNicelyDisplayName(richName:true)}");
 }
Beispiel #10
0
 public override string GetRichName()
 {
     return(target.GetNicelyDisplayName(richName: true) + uNodeUtility.WrapTextWithKeywordColor(" is ") + target.GetNicelyDisplayName(richName: true, typeTargetWithTypeof: false));
 }
Beispiel #11
0
 public override string GetRichName()
 {
     return("Wait For Second:" + waitTime.GetNicelyDisplayName(richName: true));
 }
Beispiel #12
0
 public override string GetRichName()
 {
     return("-" + target.GetNicelyDisplayName(richName: true));
 }
Beispiel #13
0
 public override string GetRichName()
 {
     return(uNodeUtility.WrapTextWithKeywordColor("do while: ") + condition.GetNicelyDisplayName(richName: true));
 }
Beispiel #14
0
 public override string GetRichName()
 {
     return(targetA.GetNicelyDisplayName(richName: true) + " ?? " + targetB.GetNicelyDisplayName(richName: true));
 }
Beispiel #15
0
 public override string GetRichName()
 {
     return($"({type.GetNicelyDisplayName(richName:true, typeTargetWithTypeof:false)})" + target.GetNicelyDisplayName(richName: true));
 }
Beispiel #16
0
 public override string GetRichName()
 {
     return($"? {condition.GetNicelyDisplayName(richName:true)} {onTrue.GetNicelyDisplayName(richName:true)} : {onFalse.GetNicelyDisplayName(richName:true)}");
 }
Beispiel #17
0
 public override string GetRichName()
 {
     return(uNodeUtility.WrapTextWithKeywordColor("using: ") + target.GetNicelyDisplayName(richName: true));
 }
Beispiel #18
0
 public override string GetRichName()
 {
     return(uNodeUtility.WrapTextWithKeywordColor("yield return ") + value.GetNicelyDisplayName(richName: true));
 }
Beispiel #19
0
 public override string GetRichName()
 {
     return($"{uNodeUtility.WrapTextWithKeywordColor("switch")}: {target.GetNicelyDisplayName(richName:true)}");
 }