Class cocos.scene.Scene

         object --+    
                  |    
cocosnode.CocosNode --+
                      |
         object --+   |
                  |   |
  EventHandlerMixin --+
                      |
                     Scene

Methods

  __init__(self, *children)
Creates a Scene with layers and / or scenes.
  on_enter(self)
Called every time just before the node enters the stage.
  push_all_handlers(self)
  remove_all_handlers(self)
  enable_handlers(self, value=True)
This function makes the scene elegible for receiving events
  end(self, value=None)
Ends the current scene setting director.return_value with value
Inherited from cocosnode.CocosNode: __contains__, add, are_actions_running, do, draw, get, get_ancestor, get_children, on_exit, pause, pause_scheduler, remove, remove_action, resume, resume_scheduler, schedule, schedule_interval, stop, transform, unschedule, visit, walk Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Instance Variables

Inherited from cocosnode.CocosNode: actions, camera, children, children_anchor_x, children_anchor_y, children_names, grid, is_running, rotation, scale, scheduled_calls, scheduled_interval_calls, skip_frame, to_remove, transform_anchor_x, transform_anchor_y, visible, x, y

Class Variables

Inherited from cocosnode.CocosNode: anchor, anchor_x, anchor_y, children_anchor, parent, position, transform_anchor

Method Details

__init__

(Constructor) __init__(self, *children)

Creates a Scene with layers and / or scenes.

Responsibilities:
Control the dispatching of events to its layers
Parameters:
children : list of Layer or Scene
Layers or Scenes that will be part of the scene. They are automatically assigned a z-level from 0 to num_children.
Overrides:
cocosnode.CocosNode.__init__

on_enter

on_enter(self)
Called every time just before the node enters the stage.
Overrides:
cocosnode.CocosNode.on_enter

end

end(self, value=None)
Ends the current scene setting director.return_value with value
Parameters:
value : anything
The return value. It can be anything. A type or an instance.