Files
cardgen/reference/SOR.Game/Abilities/Models/AbilityAnimationDefinition.cs
T

57 lines
2.2 KiB
C#

namespace SOR.Game.Abilities.Models;
/// <summary>The visual presentation style for an ability animation.</summary>
public enum AbilityAnimationType
{
/// <summary>A projectile that arcs from caster to target.</summary>
Projectile,
/// <summary>A projectile that travels in a straight line from caster to target.</summary>
LinearProjectile,
/// <summary>A projectile that follows a parabolic arc from caster to target.</summary>
ArcProjectile,
/// <summary>A radial aura effect centered on the caster or target.</summary>
Aura,
}
/// <summary>Where the animation effect VFX is rendered.</summary>
public enum AbilityAnimationEffect
{
/// <summary>Effect plays on the ability's source unit.</summary>
Self,
/// <summary>Effect plays on each selected target.</summary>
Target,
/// <summary>Effect plays on a subset of affected units.</summary>
Some,
/// <summary>Effect covers the entire board (e.g. board-wide clear).</summary>
All,
}
/// <summary>
/// Client-side animation and sound metadata for an ability.
/// Stored inside AbilityDefinition.Animation (JSONB).
/// Not used by server game logic — purely for the client renderer and audio system.
/// </summary>
public sealed class AbilityAnimationDefinition
{
public AbilityAnimationType Type { get; set; } = AbilityAnimationType.Projectile;
public AbilityAnimationEffect Effect { get; set; } = AbilityAnimationEffect.Target;
/// <summary>CDN URL to the animation asset (particle effect, sprite sheet, etc.).</summary>
public string? AssetUrl { get; set; }
/// <summary>Scale width multiplier for the effect (1.0 = default size).</summary>
public float Width { get; set; } = 1f;
/// <summary>Scale height multiplier for the effect (1.0 = default size).</summary>
public float Height { get; set; } = 1f;
/// <summary>Duration of the animation in seconds.</summary>
public float Duration { get; set; } = 1f;
/// <summary>CDN URL to the sound played when the ability is cast/activated.</summary>
public string? CastSoundUrl { get; set; }
/// <summary>CDN URL to the sound played on impact/effect resolution.</summary>
public string? ImpactSoundUrl { get; set; }
}