Class ProjectileDef

Namespace
TDMaker.Core.Defs
Assembly
TDMaker.Core.dll

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

kind ProjectileKind
speed float
arcHeight float
lifetime float
viewKey string
flightTime float
hitRadius float

Properties

ArcHeight

Visual ballistic height at the middle of the flight.

public float ArcHeight { get; }

Property Value

float

FlightTime

Optional fixed flight duration; zero selects distance divided by speed.

public float FlightTime { get; }

Property Value

float

HitRadius

Allowed distance between the aim point and a moving single target at impact.

public float HitRadius { get; }

Property Value

float

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

AreaEffectDef

Kind

The travel model.

public ProjectileKind Kind { get; }

Property Value

ProjectileKind

Lifetime

Maximum time before a projectile expires.

public float Lifetime { get; }

Property Value

float

Options

Prediction and target-loss policy.

public ProjectileOptions Options { get; }

Property Value

ProjectileOptions

Speed

Travel speed in world units per second.

public float Speed { get; }

Property Value

float

ViewKey

Optional view lookup key.

public string ViewKey { get; }

Property Value

string

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

area AreaEffectDef

Returns

ProjectileDef

WithOptions(ProjectileOptions)

Copies projectile data with flight extensions.

public ProjectileDef WithOptions(ProjectileOptions options)

Parameters

options ProjectileOptions

Returns

ProjectileDef