Class CueTimeline
java.lang.Object
privbot.mechanics.CueTimeline
Holds the combat style the most recently LAUNCHED attack demands. Projectiles arrive in the order they land, not the
order they were fired, so a slow old flight must not overwrite a newer attack; offers are compared by launch cycle.
What it proves: current() is the style of the latest launch offered so far.
Unreadable looks like: current() is null and lastCycle() is -1 while nothing is held.
Callers act only on a non-null style.
Thread rule: not thread safe; keep it on the one worker thread that samples cues. No client calls.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()current()intThe held cue's launch cycle, or -1 when empty.booleanoffer(CombatStyle style, int launchCycle) Accepts the cue when nothing is held orlaunchCycleis later than the held one.
-
Constructor Details
-
CueTimeline
public CueTimeline()
-
-
Method Details
-
offer
Accepts the cue when nothing is held orlaunchCycleis later than the held one. Returns whether it did. -
current
-
lastCycle
public int lastCycle()The held cue's launch cycle, or -1 when empty. -
clear
public void clear()
-