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

                // TODO: Reverse lookup the enum attribute
                return(affector.ForceApplication.ToString().ToLower());
            }
Exemple #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));
            }
Exemple #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");;
                }
            }
Exemple #4
0
            public void Set(object target, string val)
            {
                LinearForceAffector affector = target as LinearForceAffector;

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