Skip to main content

ActiveSpit

A class in Root.Township, Alta.Intelligence.Wyrms.

Wyrm ranged spit attack action, preferring targets near BestRange. Runs on the server.

Constructors​

MemberWhat it is
ActiveSpit()Creates an ActiveSpit with default values.

Fields​

1 private and internal field
MemberWhat it is
private AnimatedFloat angleNetworked animator float for the spit's vertical aim angle, in radians.

Methods​

MemberWhat it is
static BasicAction<Wyrm, ActiveSpit, WyrmSpitSettings> GetAction(WyrmSpitSettings settings)Builds the spit action: dangerous target within MaximumRange, best near BestRange, preferring living and hurt ones.
override void Update(bool hasTarget)Faces the target and sets the aim angle float to the vertical angle toward it.
protected override void OnStart()Fires a random spit trigger, grabs the aim angle float and sets the duration.