Inherits from SPDisplayObjectContainer : SPDisplayObject : SPEventDispatcher : NSObject
Declared in SPStage.h

Overview

An SPStage is the root of the display tree. It represents the rendering area of the application.

Sparrow will create the stage for you. The root object of your game will be the first child of the stage. You can access root and stage from any display object using the respective properties.

The stage’s width and height values define the coordinate system of your game. The color of the stage defines the background color of your game.

Tasks

Initialization

Properties

  •   color

    The background color of the stage. Default: black.

    property
  •   width

    The height of the stage’s coordinate system.

    property
  •   height

    The width of the stage’s coordinate system.

    property

Properties

color

The background color of the stage. Default: black.

@property (nonatomic, assign) uint color

Discussion

The background color of the stage. Default: black.

Declared In

SPStage.h

height

The width of the stage’s coordinate system.

@property (nonatomic, assign) float height

Discussion

The width of the stage’s coordinate system.

Declared In

SPStage.h

width

The height of the stage’s coordinate system.

@property (nonatomic, assign) float width

Discussion

The height of the stage’s coordinate system.

Declared In

SPStage.h

Instance Methods

initWithWidth:height:

Initializes a stage with a certain size in points.

- (instancetype)initWithWidth:(float)width height:(float)height

Discussion

Initializes a stage with a certain size in points.

Declared In

SPStage.h