﻿using Microsoft.Xna.Framework;
using SkidiKit.Graphics;

namespace SkidiKit.Components.ParticleSystem
{
    public class ParticelSystemConfig
    {
        public float Duration { get; set; }
        public float Life { get; set; }
        public float LifeVar { get; set; }
        public float Angle { get; set; }
        public float AngleVar { get; set; }
        public float StartSize { get; set; }
        public float StartSizeVar { get; set; }
        public float EndSize { get; set; }
        public float EndSizeVar { get; set; }
        public float StartSpin { get; set; }
        public float StartSpinVar { get; set; }
        public float EndSpin { get; set; }
        public float EndSpinVar { get; set; }

        public Vector4 StartColor { get; set; }
        public Vector4 StartColorVar { get; set; }
        public Vector4 EndColor { get; set; }
        public Vector4 EndColorVar { get; set; }

        public Vector2 Position { get; set; }
        public Vector2 PositionVar { get; set; }
        public PositionType PositionType { get; set; }

        public Vector2 Gravity { get; set; }
        public float GravityRadialAccel { get; set; }
        public float GravityRadialAccelVar { get; set; }
        public float GravitySpeed { get; set; }
        public float GravitySpeedVar { get; set; }
        public float GravityTangentialAccel { get; set; }
        public float GravityTangentialAccelVar { get; set; }
        public bool GravityRotationIsDir { get; set; }

        public float RadialEndRadius { get; set; }
        public float RadialEndRadiusVar { get; set; }
        public float RadialRotatePerSecond { get; set; }
        public float RadialRotatePerSecondVar { get; set; }
        public float RadialStartRadius { get; set; }
        public float RadialStartRadiusVar { get; set; }

        public int MaxParticles { get; set; }
        public EmmiterMode EmmiterMode { get; set; }

        public TextureFrame TextureFrame { get; set; }

        public ParticelSystemConfig Clone()
        {
            return new ParticelSystemConfig
            {
                Angle = Angle,
                AngleVar = AngleVar,
                Duration = Duration,
                TextureFrame = TextureFrame,
                EmmiterMode = EmmiterMode,
                Position = Position,
                PositionVar = PositionVar,
                PositionType = PositionType,
                StartColor = StartColor,
                StartColorVar = StartColorVar,
                EndColor = EndColor,
                EndColorVar = EndColorVar,
                StartSize = StartSize,
                StartSizeVar = StartSizeVar,
                EndSize = EndSize,
                EndSizeVar = EndSizeVar,
                StartSpin = StartSpin,
                StartSpinVar = StartSpinVar,
                EndSpin = EndSpin,
                EndSpinVar = EndSpinVar,
                Life = Life,
                LifeVar = LifeVar,
                MaxParticles = MaxParticles,

                Gravity = Gravity,
                GravitySpeed = GravitySpeed,
                GravitySpeedVar = GravitySpeedVar,
                GravityRadialAccel = GravityRadialAccel,
                GravityRadialAccelVar = GravityRadialAccelVar,
                GravityTangentialAccel = GravityTangentialAccel,
                GravityTangentialAccelVar = GravityTangentialAccelVar,
                GravityRotationIsDir = GravityRotationIsDir,

                RadialStartRadius = RadialStartRadius,
                RadialStartRadiusVar = RadialStartRadiusVar,
                RadialEndRadius = RadialEndRadius,
                RadialEndRadiusVar = RadialEndRadiusVar,
                RadialRotatePerSecond = RadialRotatePerSecond,
                RadialRotatePerSecondVar = RadialRotatePerSecondVar
            };
        }
    }
}