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();
            }
            else if (variable.GetType() == typeof(AnimatorVariable))
            {
                summary += animatorData.GetDescription();
            }
            else if (variable.GetType() == typeof(AudioSourceVariable))
            {
                summary += audioSourceData.GetDescription();
            }
            else if (variable.GetType() == typeof(ColorVariable))
            {
                summary += colorData.GetDescription();
            }
            else if (variable.GetType() == typeof(GameObjectVariable))
            {
                summary += gameObjectData.GetDescription();
            }
            else if (variable.GetType() == typeof(MaterialVariable))
            {
                summary += materialData.GetDescription();
            }
            else if (variable.GetType() == typeof(ObjectVariable))
            {
                summary += objectData.GetDescription();
            }
            else if (variable.GetType() == typeof(Rigidbody2DVariable))
            {
                summary += rigidbody2DData.GetDescription();
            }
            else if (variable.GetType() == typeof(SpriteVariable))
            {
                summary += spriteData.GetDescription();
            }
            else if (variable.GetType() == typeof(TextureVariable))
            {
                summary += textureData.GetDescription();
            }
            else if (variable.GetType() == typeof(TransformVariable))
            {
                summary += transformData.GetDescription();
            }
            else if (variable.GetType() == typeof(Vector2Variable))
            {
                summary += vector2Data.GetDescription();
            }
            else if (variable.GetType() == typeof(Vector3Variable))
            {
                summary += vector3Data.GetDescription();
            }

            return(summary);
        }
Exemple #2
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;
            }

            var t = variable.GetType();

            if (t == typeof(BooleanVariable))
            {
                description += booleanData.GetDescription();
            }
            else if (t == typeof(IntegerVariable))
            {
                description += integerData.GetDescription();
            }
            else if (t == typeof(FloatVariable))
            {
                description += floatData.GetDescription();
            }
            else if (t == typeof(StringVariable))
            {
                description += stringData.GetDescription();
            }
            else if (t == typeof(AnimatorVariable))
            {
                description += animatorData.GetDescription();
            }
            else if (t == typeof(AudioSourceVariable))
            {
                description += audioSourceData.GetDescription();
            }
            else if (t == typeof(ColorVariable))
            {
                description += colorData.GetDescription();
            }
            else if (t == typeof(GameObjectVariable))
            {
                description += gameObjectData.GetDescription();
            }
            else if (t == typeof(MaterialVariable))
            {
                description += materialData.GetDescription();
            }
            else if (t == typeof(ObjectVariable))
            {
                description += objectData.GetDescription();
            }
            else if (t == typeof(Rigidbody2DVariable))
            {
                description += rigidbody2DData.GetDescription();
            }
            else if (t == typeof(SpriteVariable))
            {
                description += spriteData.GetDescription();
            }
            else if (t == typeof(TextureVariable))
            {
                description += textureData.GetDescription();
            }
            else if (t == typeof(TransformVariable))
            {
                description += transformData.GetDescription();
            }
            else if (t == typeof(Vector2Variable))
            {
                description += vector2Data.GetDescription();
            }
            else if (t == typeof(Vector3Variable))
            {
                description += vector3Data.GetDescription();
            }

            return(description);
        }