Inheritance: ParticleSystemRenderer
コード例 #1
0
        public static void ParseCommonUpDirection(string[] values, ParticleSystemRenderer _renderer)
        {
            if (values.Length != 3)
            {
                ParseHelper.LogParserError("common_up_vector", _renderer.Type, "Wrong number of parameters.");
                return;
            }
            BillboardParticleRenderer renderer = (BillboardParticleRenderer)_renderer;

            renderer.CommonUpVector = StringConverter.ParseVector3(values);
        }
コード例 #2
0
        public override void CopyParametersTo(ParticleSystemRenderer other)
        {
            BillboardParticleRenderer otherBpr = (BillboardParticleRenderer)other;

            Debug.Assert(otherBpr != null);
            otherBpr.BillboardType     = this.BillboardType;
            otherBpr.BillboardOrigin   = this.BillboardOrigin;
            otherBpr.CommonUpVector    = this.CommonUpVector;
            otherBpr.CommonDirection   = this.CommonDirection;
            otherBpr.DepthOffset       = this.DepthOffset;
            otherBpr.UseAccurateFacing = this.UseAccurateFacing;
        }
コード例 #3
0
        public static void ParseDepthOffset(string[] values, ParticleSystemRenderer _renderer)
        {
            if (values.Length != 1)
            {
                ParseHelper.LogParserError("depth_offset", _renderer.Type, "Wrong number of parameters.");
                return;
            }

            BillboardParticleRenderer renderer = (BillboardParticleRenderer)_renderer;

            renderer.DepthOffset = StringConverter.ParseFloat(values[0]);
        }
コード例 #4
0
        public static void ParseAccurateFacing(string[] values, ParticleSystemRenderer _renderer)
        {
            if (values.Length != 1)
            {
                ParseHelper.LogParserError("accurate_facing", _renderer.Type, "Wrong number of parameters.");
                return;
            }

            BillboardParticleRenderer renderer = (BillboardParticleRenderer)_renderer;

            renderer.UseAccurateFacing = StringConverter.ParseBool(values[0]);
        }
コード例 #5
0
        public static void ParsePointRendering(string[] values, ParticleSystemRenderer _renderer)
        {
            if (values.Length != 1)
            {
                ParseHelper.LogParserError("point_rendering", _renderer.Type, "Wrong number of parameters.");
                return;
            }

            BillboardParticleRenderer renderer = (BillboardParticleRenderer)_renderer;

            renderer.PointRenderingEnabled = StringConverter.ParseBool(values[0]);
        }
コード例 #6
0
        public static void ParseBillboardOrigin(string[] values, ParticleSystemRenderer _renderer)
        {
            if (values.Length != 1)
            {
                ParseHelper.LogParserError("billboard_origin", _renderer.Type, "Wrong number of parameters.");
                return;
            }

            // lookup the real enum equivalent to the script value
            object val = ScriptEnumAttribute.Lookup(values[0], typeof(BillboardOrigin));

            BillboardParticleRenderer renderer = (BillboardParticleRenderer)_renderer;

            // if a value was found, assign it
            if (val != null)
            {
                renderer.BillboardOrigin = (BillboardOrigin)val;
            }
            else
            {
                ParseHelper.LogParserError("billboard_origin", _renderer.Type, "Invalid enum value");
            }
        }