Esempio n. 1
0
        public override string GetSummary()
        {
            if (variable == null)
            {
                return("Error: No variable selected");
            }

            string summary = variable.Key + " ";

            summary += Condition.GetOperatorDescription(compareOperator) + " ";

            if (variable.GetType() == typeof(BooleanVariable))
            {
                summary += booleanData.GetDescription();
            }
            else if (variable.GetType() == typeof(IntegerVariable))
            {
                summary += integerData.GetDescription();
            }
            else if (variable.GetType() == typeof(FloatVariable))
            {
                summary += floatData.GetDescription();
            }
            else if (variable.GetType() == typeof(StringVariable))
            {
                summary += stringData.GetDescription();
            }

            return(summary);
        }
Esempio n. 2
0
        public override string GetSummary()
        {
            if (_targetGameObject.Value == null)
            {
                return("Error: No game object selected");
            }

            return(_targetGameObject.Value.name + " = " + activeState.GetDescription());
        }
Esempio n. 3
0
        public override string GetSummary()
        {
            if (variable == null)
            {
                return("Error: Variable not selected");
            }

            string description = variable.Key;

            switch (setOperator)
            {
            default:
            case SetOperator.Assign:
                description += " = ";
                break;

            case SetOperator.Negate:
                description += " =! ";
                break;

            case SetOperator.Add:
                description += " += ";
                break;

            case SetOperator.Subtract:
                description += " -= ";
                break;

            case SetOperator.Multiply:
                description += " *= ";
                break;

            case SetOperator.Divide:
                description += " /= ";
                break;
            }

            if (variable.GetType() == typeof(BooleanVariable))
            {
                description += booleanData.GetDescription();
            }
            else if (variable.GetType() == typeof(IntegerVariable))
            {
                description += integerData.GetDescription();
            }
            else if (variable.GetType() == typeof(FloatVariable))
            {
                description += floatData.GetDescription();
            }
            else if (variable.GetType() == typeof(StringVariable))
            {
                description += stringData.GetDescription();
            }

            return(description);
        }