Summary description for LinearForceAffector.
Inheritance: Axiom.ParticleSystems.ParticleAffector
Example #1
0
            public string Get(object target)
            {
                LinearForceAffector affector = target as LinearForceAffector;

                // TODO: Reverse lookup the enum attribute
                return(affector.ForceApplication.ToString().ToLower());
            }
Example #2
0
            public string Get(object target)
            {
                LinearForceAffector affector = target as LinearForceAffector;

                Vector3 vec = affector.Force;

                // TODO: Common way for vector string rep, maybe modify ToString
                return(string.Format("{0} {1} {2}", vec.x, vec.y, vec.z));
            }
Example #3
0
            public void Set(object target, string val)
            {
                LinearForceAffector affector = target as LinearForceAffector;

                // lookup the real enum equivalent to the script value
                object enumVal = ScriptEnumAttribute.Lookup(val, typeof(ForceApplication));

                // if a value was found, assign it
                if (enumVal != null)
                {
                    affector.ForceApplication = ((ForceApplication)enumVal);
                }
                else
                {
                    ParseHelper.LogParserError(val, affector.Type, "Invalid enum value");;
                }
            }
Example #4
0
            public void Set(object target, string val)
            {
                LinearForceAffector affector = target as LinearForceAffector;

                affector.Force = StringConverter.ParseVector3(val);
            }