Specialclass | query.t[565] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
At any given time, a Special is either active or inactive. This is determined by the active() method.
class
Special : object
commLink
QDefaults
QSenseRegion
QViewport
active
all
allActive_
priority
allActive
classInit
first
next
active | query.t[570] |
all | query.t[711] |
allActive_ | query.t[685] |
priority | query.t[607] |
The library uses the following special priority values:
0 = the basic library defaults. The defaults must have the lowest priority, meaning that all Special objects defined by a game or extension must use priorities higher than 0.
Other than the special priorities listed above, the priority is simply a relative ordering, so games and extensions can use whatever range of values they like.
Note that priorities can't change while running. This is a permanent feature of the object. We take advantage of this to avoid re-sorting the active list every time we build it. We sort the master list at initialization and assume it stays sorted, so that any subset is inherently sorted. If it's important to the game to dynamically change priorities, you just need to re-sort the allActive_ list at appropriate times. If priorities can only change when the game-world state changes, you can simply sort the list in allActive() each time it's rebuilt. If priorities can change at other times (which doesn't seem like it'd be useful, but just in case), you'd need to re-sort the list on every call to allActive(), even when the list isn't rebuilt.
allActive ( ) | query.t[666] |
classInit ( ) | query.t[688] |
first (prop) | query.t[644] |
next ( ) | query.t[621] |
This is analogous to using 'inherited' to inherit the superclass version of a method from an overriding version in a subclass. As with 'inherited', you can only call this directly from the method that you want to pass to the default handling, because this routine determines what to call based on the caller.