BaseComponent2D
Summary
Base class for 2D components.
Constructor
BaseComponent2D
Syntax
BaseComponent2D
-
core
-
name
Summary
Parameters:
-
core
wnp.CoreCore instance
-
name
StringComponent name
Item Index
Methods
Methods
destroy
Syntax
destroy
()
Summary
Method called when the component is destroyed
disable
Syntax
disable
()
Summary
Disables the component
enable
Syntax
enable
()
Summary
Enables the component
getTargeted
Syntax
Summary
Finds out if the given position is over an element handled by the component
Parameters:
-
vector
VectorA position, usually the cursor's one.
Returns:
The targeted element, or null if nothing is found.
initialize
Syntax
initialize
()
Summary
Method called when Wanaplan is initialized. You don't need to call this method manually.
onContextChanged
Syntax
onContextChanged
-
context
Summary
Method called when the context is switched (2D -> 3D or 3D -> 2D)
Parameters:
-
context
StringThe new context
startListening
Syntax
startListening
()
Summary
Calls all the event listeners.
stopListening
Syntax
stopListening
()
Summary
Removes all the event listeners.
update
Syntax
update
()
Summary
Generic update method, called on every frame
Properties
priority
Syntax
priority
Number
Summary
Priority of the component in the "update" and "draw" routines
structure
Syntax
structure
wnp.Structure
Summary
Structure file instance (shortcut to wanaplan.structure). This is the base object where the whole plan is saved