Reza Ghobadinic

Node

The Node Class

This class is the base class for some of the most important classes that allow us to show something on the screen (Layer, Sprite, Label, Menu, etc…). It also is the base class for the Scene Graph elements (Scene) that allow us to switch from one scene to another in our game (More on this in later posts…).

The main features of Node class are:

The node class itself doesn’t draw anything on the screen as is, but we can inherit from this class and override its draw virtual method to draw things on the screen OR just use the Sprite class instead. According to the class reference document, subclassing a Node usually means:

Node objects also have these useful properties: position, scale, rotation, anchor point, contentSize, visible.

  1. Node Creation
  2. Node Callbacks
  3. Node Parenting
  4. Node Actions
Exit mobile version