using System;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
namespace Robust.Shared.GameObjects
{
[Serializable, NetSerializable]
public sealed class EffectSystemMessage : EntityEventArgs
{
///
/// Path to the texture used for the effect.
/// Can also be a path to an RSI. In that case, must also be set.
///
public string EffectSprite { get; set; } = "";
///
/// Specifies the name of the RSI state to use if is an RSI.
///
public string? RsiState { get; set; }
///
/// If the sprite is an RSI state, controls whether the animation loops or ends on the last frame.
///
public bool AnimationLoops { get; set; }
///
/// Effect position attached to an entity
///
public EntityUid? AttachedEntityUid { get; set; }
///
/// Effect offset relative to the parent
///
public Vector2 AttachedOffset { get; set; } = Vector2.Zero;
///
/// Effect position relative to the emit position
///
public EntityCoordinates Coordinates { get; set; }
///
/// Where the emitter was when the effect was first emitted
///
public EntityCoordinates EmitterCoordinates { get; set; }
///
/// Effect's x/y velocity
///
public Vector2 Velocity { get; set; } = new(0, 0);
///
/// Effect's x/y acceleration
///
public Vector2 Acceleration { get; set; } = new(0, 0);
///
/// Effect's radial velocity - relative to EmitterPosition
///
public float RadialVelocity { get; set; } = 0f;
///
/// Effect's radial acceleration
///
public float RadialAcceleration { get; set; } = 0f;
///
/// Effect's tangential velocity - relative to EmitterPosition
///
public float TangentialVelocity { get; set; } = 0f;
///
/// Effect's tangential acceleration
///
public float TangentialAcceleration { get; set; } = 0f;
///
/// Effect's age -- from 0f
///
public TimeSpan Born { get; set; } = TimeSpan.Zero;
///
/// Time after which the particle will "die"
///
public TimeSpan DeathTime { get; set; } = TimeSpan.FromSeconds(1);
///
/// How long the particle lasts.
///
public TimeSpan LifeTime => DeathTime - Born;
///
/// Effect's spin about its center in radians
///
public float Rotation { get; set; } = 0f;
///
/// Rate of change of effect's spin, radians/s
///
public float RotationRate { get; set; } = 0f;
///
/// Effect's current size
///
public Vector2 Size { get; set; } = new(1f, 1f);
///
/// Rate of change of effect's size change
///
public float SizeDelta { get; set; } = 0f;
///
/// Effect's current color
///
public Vector4 Color { get; set; } = new(1, 0, 0, 0);
///
/// Rate of change of effect's color
///
public Vector4 ColorDelta { get; set; } = new(-1, 0, 0, 0);
///
/// True if the effect is affected by lighting.
///
public bool Shaded { get; set; } = true;
}
}