qc.Node represent empty game object, all other components like UIImage, Sprite, Text, .etc, all inherit from qc.Node. So all the Node's features are applied to all game objects.
Node doesn't render itself, mostly used to organize structure of the hierarchy and add script components.
Create an empty Node object
There are 4 ways to create an empty Node object:
// Create an empty node and specified the parent game.add.node(parent);
Operation of Node in Inspector
Check to make it visible, uncheck to make it hidden. when hidden, it will be rendered as gray in Hierarchy.
node.visible = true;
Set the name for node, don't contain '/' character in name, '/' character has specifical meaning in node.find method.
node.name = 'QICI Engine';
This property only is valid when the node is direct child of the world node. If checked, then this node will not be destoried when switching scene, see Loading Screen
node.ignoreDestroy = true;
The transparent value with a range from 0.0 to 1.0, alpha of 0.0 is completely transparent, alpha of 1.0 is completely opaque. The alpha value of node will effect its descendants.
node.alpha = 0.5;
See Basic Layout
If "Interactive" is unchecked, the node can not receive any input event, the event will go through it to its parent; If checked, the input event will be captured by this node.
node.interactive = true;
By default, the hit area coincides with the rectangle of the node, you can check "Editable" to change the hit area:
- None: Can not be hit, node.hitArea = null;
- Fit Target: Default value, the rectangle of the node, node.hitArea = undefined;
- Rectangle: Rectangle area, node.hitArea = new qc.Rectangle(x, y, width, height);
- Ellipse: Ellipse area, node.hitArea = new qc.Ellipse(x, y, width, height);
click "Add Component" can select scripts to mount on the node.