Пример #1
0
        public EffectBehaviorValues()
        {
            Location = new Value.Vector3D();
            Rotation = new Value.Vector3D();
            Scale    = new Value.Vector3D(1.0f, 1.0f, 1.0f);

            LocationVelocity = new Value.Vector3D();
            RotationVelocity = new Value.Vector3D();
            ScaleVelocity    = new Value.Vector3D();

            RemovedTime = new Value.IntWithInifinite(0, true, int.MaxValue, 0);

            CountX = new Value.Int(1, int.MaxValue, 1);
            CountY = new Value.Int(1, int.MaxValue, 1);
            CountZ = new Value.Int(1, int.MaxValue, 1);

            Distance = new Value.Float(5.0f, float.MaxValue, 0.0f);

            TimeSpan = new Value.Int(0);
            ColorAll = new Value.Color(255, 255, 255, 255);

            TargetLocation = new Value.Vector3D();

            PlaybackSpeed = new Value.Float(1.0f, float.MaxValue, 0.0f, 0.1f);
        }
Пример #2
0
 public UVAnimationParamater()
 {
     Start       = new Value.Vector2D();
     Size        = new Value.Vector2D();
     FrameLength = new Value.IntWithInifinite(1, false, int.MaxValue, 1);
     FrameCountX = new Value.Int(1, int.MaxValue, 1);
     FrameCountY = new Value.Int(1, int.MaxValue, 1);
     LoopType    = new Value.Enum <LoopType>(RendererCommonValues.LoopType.Once);
     StartSheet  = new Value.IntWithRandom(0, int.MaxValue, 0);
 }
Пример #3
0
 public DepthValues()
 {
     DepthOffset = new Value.Float();
     IsScaleChangedDependingOnDepthOffset         = new Value.Boolean();
     IsDepthOffsetChangedDependingOnParticleScale = new Value.Boolean();
     ZSort                       = new Value.Enum <ZSortType>(ZSortType.None);
     DrawingPriority             = new Value.Int(0, 255, -255);
     DepthClipping               = new Value.IntWithInifinite(1024, true, int.MaxValue, 16);
     SuppressionOfScalingByDepth = new Value.Float(1.0f, 1.0f, 0.0f, 0.1f);
 }
Пример #4
0
 internal CommonValues()
 {
     MaxGeneration                   = new Value.IntWithInifinite(1, false, int.MaxValue, 0);
     LocationEffectType              = new Value.Enum <ParentEffectType>(ParentEffectType.Already);
     RotationEffectType              = new Value.Enum <ParentEffectType>(ParentEffectType.Already);
     ScaleEffectType                 = new Value.Enum <ParentEffectType>(ParentEffectType.Already);
     RemoveWhenLifeIsExtinct         = new Value.Boolean(true);
     RemoveWhenParentIsRemoved       = new Value.Boolean(false);
     RemoveWhenAllChildrenAreRemoved = new Value.Boolean(false);
     Life                 = new Value.IntWithRandom(100, int.MaxValue, 1);
     GenerationTime       = new Value.FloatWithRandom(1.0f, float.MaxValue, 0.00001f);
     GenerationTimeOffset = new Value.FloatWithRandom(0, float.MaxValue, float.MinValue);
 }
Пример #5
0
 internal CommonValues()
 {
     MaxGeneration = new Value.IntWithInifinite(1, false, int.MaxValue, 0);
     LocationEffectType = new Value.Enum<ParentEffectType>(ParentEffectType.Already);
     RotationEffectType = new Value.Enum<ParentEffectType>(ParentEffectType.Already);
     ScaleEffectType = new Value.Enum<ParentEffectType>(ParentEffectType.Already);
     RemoveWhenLifeIsExtinct = new Value.Boolean(true);
     RemoveWhenParentIsRemoved = new Value.Boolean(false);
     RemoveWhenAllChildrenAreRemoved = new Value.Boolean(false);
     Life = new Value.IntWithRandom(100, int.MaxValue, 1);
     GenerationTime = new Value.FloatWithRandom(1.0f, float.MaxValue, 0.00001f);
     GenerationTimeOffset = new Value.FloatWithRandom(0.0f, float.MaxValue, 0.0f);
 }
Пример #6
0
        public static void LoadFromElement(XmlElement e, Value.IntWithInifinite value, bool isClip)
        {
            var e_value    = e["Value"] as XmlElement;
            var e_infinite = e["Infinite"] as XmlElement;

            if (e_value != null)
            {
                LoadFromElement(e_value, value.Value, isClip);
            }
            if (e_infinite != null)
            {
                LoadFromElement(e_infinite, value.Infinite, isClip);
            }
        }
Пример #7
0
            public UVAnimationParamater()
            {
                Start       = new Value.Vector2D();
                Size        = new Value.Vector2D();
                FrameLength = new Value.IntWithInifinite(1, false, int.MaxValue, 1);
                FrameCountX = new Value.Int(1, int.MaxValue, 1);
                FrameCountY = new Value.Int(1, int.MaxValue, 1);
                LoopType    = new Value.Enum <LoopType>(RendererCommonValues.LoopType.Once);
                StartSheet  = new Value.IntWithRandom(0, int.MaxValue, 0);

#if __EFFEKSEER_BUILD_VERSION16__
                FlipbookInterpolationType = new Value.Enum <FlipbookInterpolationType>(RendererCommonValues.FlipbookInterpolationType.None);
#endif
            }
Пример #8
0
        public static XmlElement SaveToElement(XmlDocument doc, string element_name, Value.IntWithInifinite value, bool isClip)
        {
            var e = doc.CreateElement(element_name);
            var v = SaveToElement(doc, "Value", value.Value, isClip);
            var i = SaveToElement(doc, "Infinite", value.Infinite, isClip);

            if (v != null)
            {
                e.AppendChild(v);
            }
            if (i != null)
            {
                e.AppendChild(i);
            }

            return(e.ChildNodes.Count > 0 ? e : null);
        }
Пример #9
0
        public EffectBehaviorValues()
        {
            Location = new Value.Vector3D();
            Rotation = new Value.Vector3D();
            Scale = new Value.Vector3D(1.0f, 1.0f, 1.0f);

            LocationVelocity = new Value.Vector3D();
            RotationVelocity = new Value.Vector3D();
            ScaleVelocity = new Value.Vector3D();

            RemovedTime = new Value.IntWithInifinite(0, true, int.MaxValue, 0);

            CountX = new Value.Int(1, int.MaxValue, 1);
            CountY = new Value.Int(1, int.MaxValue, 1);
            CountZ = new Value.Int(1, int.MaxValue, 1);

            Distance = new Value.Float(5.0f, float.MaxValue, 0.0f);
            TargetLocation = new Value.Vector3D();
        }
Пример #10
0
        internal CommonValues()
        {
            MaxGeneration                   = new Value.IntWithInifinite(1, false, int.MaxValue, 1);
            LocationEffectType              = new Value.Enum <TranslationParentEffectType>(TranslationParentEffectType.Already);
            RotationEffectType              = new Value.Enum <ParentEffectType>(ParentEffectType.Already);
            ScaleEffectType                 = new Value.Enum <ParentEffectType>(ParentEffectType.Already);
            RemoveWhenLifeIsExtinct         = new Value.Boolean(true);
            RemoveWhenParentIsRemoved       = new Value.Boolean(false);
            RemoveWhenAllChildrenAreRemoved = new Value.Boolean(false);
            Life                  = new Value.IntWithRandom(100, int.MaxValue, 1);
            GenerationTime        = new Value.FloatWithRandom(1.0f, float.MaxValue, 0.00001f);
            GenerationTimeOffset  = new Value.FloatWithRandom(0, float.MaxValue, float.MinValue);
            SteeringBehaviorParam = new SteeringBehaviorParameter();

            // dynamic parameter
            MaxGeneration.CanSelectDynamicEquation        = true;
            Life.CanSelectDynamicEquation                 = true;
            GenerationTime.CanSelectDynamicEquation       = true;
            GenerationTimeOffset.CanSelectDynamicEquation = true;
        }
Пример #11
0
        public static void LoadFromElement(XmlElement e, Value.IntWithInifinite value, bool isClip)
        {
            var e_value    = e["Value"] as XmlElement;
            var e_infinite = e["Infinite"] as XmlElement;

            // Convert int into intWithInfinit
            if (e_value == null && e_infinite == null)
            {
                var i = e.GetTextAsInt();
                value.Value.SetValue(i);
            }
            else
            {
                if (e_value != null)
                {
                    LoadFromElement(e_value, value.Value, isClip);
                }
                if (e_infinite != null)
                {
                    LoadFromElement(e_infinite, value.Infinite, isClip);
                }
            }
        }