class Object
package nb
extends Object
extended by Shape, Camera, Graph, Graphics, Interactive, Map, Node, Sprite, SubScene
NBase's object class. You should use this instead of h2d.Object
.
Still, h2d.Object
was patched via macro to support tags and IDs.
See nb.Macros.extH2dObject
.
Constructor
Variables
doOnContentChangedOnAdd:Bool = true
Whether the onContentChanged
function should get called in the onAdd
function.
read onlysize:Size = { w : 0, h : 0 }
The size of the object. You shouldn't modify it directly,
use the setSize
function instead.
This size is independent of the size of the displayed content
that you get from functions like getBounds()
.
By default, this value doesn't change and gets its behavior defined by a children class.
Methods
addChildAt(s:Object, pos:Int):Void
Inserts a child object at the specified position of the children list.
privatecontentChanged(o:Object):Void
Called by the children of a container object if they have parentContainer
defined in them.
move(dx:Float, dy:Float):Void
Moves this object by the given amount but unlike h2d.Object
, it doesn't take rotation into account.