Class: Extra (of Prop)

The Extra class is a prop used for extras (background characters).

Properties

  • y
  • x
  • z
  • heading
  • yStep
  • view
  • loop
  • cel
  • priority
  • underBits
  • signal
  • nsTop
  • nsLeft
  • nsBottom
  • nsRight
  • lsTop
  • lsLeft
  • lsBottom
  • lsRight
  • brTop
  • brLeft
  • brBottom
  • brRight
  • cycleSpeed
  • script
  • cycler
  • timer
  • cycleType
  • hesitation
  • pauseCel
  • minPause
  • maxPause
  • minCycles
  • maxCycles
  • counter
  • state
  • cycles

Methods

  • void init()

    Sets up the Extra object.

    If the pauseCel property is -1, the cel is set to a random number. If it is -2, the cel is set to the last cel. If the pauseCel is equal to the cycleType, the cel is set to the the pauseCel. Otherwise, the cel is set to the first cel.

  • void doit()

    Adjusts the cycles property and calls the super's doit() method.

  • void cue()

    Calls the changeState() method with state+1 as it's parameter if bit 0 and 2 of signal are not set.

  • void stopExtra()

    Stops the Extra.

    Sets the cel accordingly from pauseCel (see init), and they stops updating on it.

  • void startExtra()

    Starts the Extra.

    Sets the state property to 1.

  • void changeState(number newState)

    Sets the state property to newState and parses it from 0-4, performing different actions for each value. State 0 adjusts the counter, state 1 adjusts/sets the cycle, state 2 adjusts/cues the cycle, state 3 sets/cues the cycle and state 4 sets the cel according to the pauseCel and then sets the state to 0.