106 lines
4.2 KiB
C#
106 lines
4.2 KiB
C#
using UnityEngine;
|
|
|
|
namespace GazeLab.Data
|
|
{
|
|
public enum WeaponFamily
|
|
{
|
|
Physical,
|
|
Gauss,
|
|
Plasma,
|
|
Electro,
|
|
Microwave,
|
|
Special
|
|
}
|
|
|
|
public enum TrajectoryType
|
|
{
|
|
StraightBallistic,
|
|
HomingMissile,
|
|
ExpandingWave,
|
|
SineWaveSnake,
|
|
ClusterBomb,
|
|
TetherHarpoon
|
|
}
|
|
|
|
public enum StatusEffectType
|
|
{
|
|
None,
|
|
BleedShrapnel,
|
|
ArmorShred,
|
|
PlasmaBurn,
|
|
ElectroChainStun,
|
|
MicrowaveRepulseSlow,
|
|
CorrosiveDoT,
|
|
CryoChill,
|
|
VoidGravityPull,
|
|
HarpoonGrappleTether
|
|
}
|
|
|
|
[CreateAssetMenu(fileName = "ProjectileDefinition", menuName = "GazeLab/Combat/Projectile Definition", order = 2)]
|
|
public sealed class ProjectileDefinition : ScriptableObject
|
|
{
|
|
[Header("Visuals & Sprite Orientation")]
|
|
public string projectileId = "proj_default";
|
|
public Sprite projectileSprite;
|
|
[Tooltip("Angle offset (in degrees) so the sprite nose points along +X forward. Use 0 for horizontal sprites, -45 for diagonal 45-degree rockets.")]
|
|
[Range(-180f, 180f)] public float spriteRotationOffsetDeg = 0f;
|
|
[Range(0.1f, 3.0f)] public float visualScale = 0.42f;
|
|
public Color tintColor = Color.white;
|
|
public bool enableTrail = true;
|
|
public Color trailColor = new Color(0.4f, 0.85f, 1f, 0.75f);
|
|
[Range(0.02f, 0.6f)] public float trailWidth = 0.12f;
|
|
[Range(0.05f, 1.0f)] public float trailTime = 0.18f;
|
|
|
|
[Header("Ballistics & Trajectory")]
|
|
public TrajectoryType trajectoryType = TrajectoryType.StraightBallistic;
|
|
[Min(0.5f)] public float speed = 11f;
|
|
[Min(0.2f)] public float lifetime = 3.2f;
|
|
[Range(0.05f, 1.5f)] public float hitRadius = 0.24f;
|
|
|
|
[Header("Piercing & Homing Settings")]
|
|
[Min(0)] public int pierceCount = 0;
|
|
[Range(0.2f, 1.0f)] public float pierceDamageRetention = 0.8f;
|
|
[Tooltip("For HomingMissile: turn speed in degrees per second.")]
|
|
[Range(30f, 720f)] public float homingTurnRateDeg = 210f;
|
|
|
|
[Header("Wave, Sine & Cluster Settings")]
|
|
[Tooltip("For ExpandingWave: multiplies projectile scale over its flight time.")]
|
|
public AnimationCurve waveScaleOverLifetime = AnimationCurve.Linear(0f, 0.5f, 1f, 2.2f);
|
|
[Range(0f, 15f)] public float knockbackForce = 0f;
|
|
[Range(1f, 25f)] public float sineFrequency = 10f;
|
|
[Range(0.05f, 1.5f)] public float sineAmplitude = 0.35f;
|
|
[Tooltip("For ClusterBomb: sub-projectile spawned on detonation.")]
|
|
public ProjectileDefinition submunitionProjectile;
|
|
[Range(0, 16)] public int submunitionCount = 6;
|
|
[Range(0f, 3.5f)] public float aoeExplosionRadius = 0f;
|
|
|
|
[Header("Tactical Damage Matrix")]
|
|
[Min(1f)] public float baseDamage = 15f;
|
|
[Range(0.25f, 3.5f)] public float shieldMultiplier = 1.0f;
|
|
[Range(0.25f, 3.5f)] public float armorMultiplier = 1.0f;
|
|
[Range(0.25f, 3.5f)] public float hullMultiplier = 1.0f;
|
|
[Range(0.25f, 3.5f)] public float asteroidMultiplier = 1.0f;
|
|
[Tooltip("Bonus additive chance (0..1) for large asteroids to fragment into smaller asteroids.")]
|
|
[Range(0f, 1f)] public float bonusAsteroidSplitChance = 0f;
|
|
|
|
[Header("Elemental Status & Harpoon Settings")]
|
|
public StatusEffectType statusEffect = StatusEffectType.None;
|
|
[Range(0f, 1f)] public float statusProcChance = 1.0f;
|
|
[Min(0.1f)] public float statusDuration = 3.0f;
|
|
[Min(0f)] public float statusPotency = 5.0f;
|
|
[Tooltip("For ElectroChainStun: how many nearby enemies the lightning jumps to.")]
|
|
[Range(0, 6)] public int chainTargetsCount = 0;
|
|
[Range(0.5f, 6f)] public float chainRange = 2.8f;
|
|
[Tooltip("For TetherHarpoon: pull speed and chain duration.")]
|
|
[Range(1f, 12f)] public float harpoonPullForce = 4.5f;
|
|
[Range(1f, 10f)] public float harpoonTetherDuration = 4.5f;
|
|
|
|
[Header("Impact Explosion VFX")]
|
|
public Sprite explosionSprite;
|
|
public CentroidOpacityProfile explosionCentroidProfile;
|
|
[Range(0.2f, 3.5f)] public float explosionScale = 0.85f;
|
|
public AudioClip impactSfx;
|
|
}
|
|
}
|
|
|