The Scenery Class allows a number of Decoration objects to be created on one master Scenery object, potentially saving having to create several or many Decoration objects manually. It is intended principally for Decorations for which we just want a description.
Note that we shouldn't define any vocab or description on the Scenery object itself, but we should put it in the location where we want the Decoration objects it creates to be lccated.
class
Scenery : PreinitObject
Superclass Tree (in declaration order)
Scenery
PreinitObject
ModuleExecObject
object
Subclass Tree
Scenery
MultiLocScenery
Global Objects
(none)
Summary of Properties
initiallyPresent
myObjs
notImportantMsg
scenList
visibleInDark
Inherited from PreinitObject
:
execBeforeMe
reverseGlobalSymbols
Inherited from ModuleExecObject
:
execAfterMe
hasInitialized_
isDoingExec_
isExecuted_
Summary of Methods
execute
initLocation
makePresent
moveInto
newObj
Inherited from ModuleExecObject
:
_execute
classExec
Properties
Flag: are our decoration items initially present in our location? By default they are, but there may be circumstances (e.g. changhe from night time to daytime) when we want them to start out off stage.
A list of the Decoration objects created by this Scenery object at preInit.
The list of vocab, descriptions and optionally notImportantMsgs for each of our Decoratio objects. Each item in the list should be a list of two or three items of the form *. [vocab, desc]
or [vocab, desc, notImportantMsg] *. vocab and notImportantMsg must be supplied as single-quoted strings. desc can be either at single-quoted string or an anonymous method or function. The vocab string should be defined as for the vocab string of a normal Thing. *. The scenList property can be defined through the Scenery template.
Flag; should the decorations we create be visible in the dark. By default they're not, but if, for example, we're creating a series of sky objects for use at night time, such as sky, moon, and clouds, we might want them to be.
Methods
PreInitialization of a Scenery object creates the Decoration objects defined in our ScenList property.
For the base Scenery class, move our new object into our own location.
If our decoration start offstage or have been moved elsewhere we can restore/move them to our location by calling makePresent() or makePresent(true). To remove them all call makePresent(nil).
We can call moveInto() on us to call it on each of the decorations we have created. Tbis might most usefully be used with loc = nil to move all our decoration objects off-stage.
For the base Scenery claas, create a new object of the ScenItem class and returnb a reference to it.
Adv3Lite Library Reference Manual
Generated on 25/04/2024 from adv3Lite version 2.0