コード例 #1
0
ファイル: If.cs プロジェクト: hunter10/Fungus-3D-Template
        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);
        }
コード例 #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;
            }

            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();
            }
            else if (variable.GetType() == typeof(GameObjectVariable))
            {
                description += gameObjectData.GetDescription();
            }

            return(description);
        }
コード例 #3
0
        public override string GetSummary()
        {
            if (toggle == null)
            {
                return("Error: Toggle object not selected");
            }

            return(toggle.name + " = " + value.GetDescription());
        }
コード例 #4
0
        public override string GetSummary()
        {
            if (_targetGameObject.Value == null)
            {
                return("Error: No game object selected");
            }

            return(_targetGameObject.Value.name + " = " + activeState.GetDescription());
        }
コード例 #5
0
        public override string GetSummary()
        {
            if (targetName.Length == 0)
            {
                return("Error: No game object name");
            }

            return(targetName + " = " + activeState.GetDescription());
        }
コード例 #6
0
ファイル: If.cs プロジェクト: bursaar/TheFacility
        public override string GetSummary()
        {
            if (variable == null)
            {
                return("Error: No variable selected");
            }

            string summary = variable.key;

            switch (compareOperator)
            {
            case CompareOperator.Equals:
                summary += " == ";
                break;

            case CompareOperator.NotEquals:
                summary += " != ";
                break;

            case CompareOperator.LessThan:
                summary += " < ";
                break;

            case CompareOperator.GreaterThan:
                summary += " > ";
                break;

            case CompareOperator.LessThanOrEquals:
                summary += " <= ";
                break;

            case CompareOperator.GreaterThanOrEquals:
                summary += " >= ";
                break;
            }

            if (variable.GetType() == typeof(BooleanVariable))
            {
                summary += booleanValue.GetDescription();
            }
            else if (variable.GetType() == typeof(IntegerVariable))
            {
                summary += integerValue.GetDescription();
            }
            else if (variable.GetType() == typeof(FloatVariable))
            {
                summary += floatValue.GetDescription();
            }
            else if (variable.GetType() == typeof(StringVariable))
            {
                summary += stringValue.GetDescription();
            }

            return(summary);
        }
コード例 #7
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();
            }
            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);
        }
コード例 #8
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);
        }