Class ProjectileDef
Immutable projectile travel data.
public sealed class ProjectileDef
- Inheritance
-
ProjectileDef
- Inherited Members
Constructors
ProjectileDef(ProjectileKind, float, float, float, string, float, float)
Creates projectile data.
public ProjectileDef(ProjectileKind kind = ProjectileKind.Instant, float speed = 1, float arcHeight = 0, float lifetime = 30, string viewKey = null, float flightTime = 0, float hitRadius = 0)
Parameters
kindProjectileKindspeedfloatarcHeightfloatlifetimefloatviewKeystringflightTimefloathitRadiusfloat
Properties
ArcHeight
Visual ballistic height at the middle of the flight.
public float ArcHeight { get; }
Property Value
FlightTime
Optional fixed flight duration; zero selects distance divided by speed.
public float FlightTime { get; }
Property Value
HitRadius
Allowed distance between the aim point and a moving single target at impact.
public float HitRadius { get; }
Property Value
ImpactArea
Optional region created once at actual arrival, including an empty-ground impact. Cancellation and lifetime expiry do not create it.
public AreaEffectDef ImpactArea { get; }
Property Value
Kind
The travel model.
public ProjectileKind Kind { get; }
Property Value
Lifetime
Maximum time before a projectile expires.
public float Lifetime { get; }
Property Value
Options
Prediction and target-loss policy.
public ProjectileOptions Options { get; }
Property Value
Speed
Travel speed in world units per second.
public float Speed { get; }
Property Value
ViewKey
Optional view lookup key.
public string ViewKey { get; }
Property Value
Methods
WithImpactArea(AreaEffectDef)
Copies flight data and adds a once-per-projectile residual region, distinct from per-victim damage payloads.
public ProjectileDef WithImpactArea(AreaEffectDef area)
Parameters
areaAreaEffectDef
Returns
WithOptions(ProjectileOptions)
Copies projectile data with flight extensions.
public ProjectileDef WithOptions(ProjectileOptions options)
Parameters
optionsProjectileOptions