Class cocos.layer.base_layers.Layer

             object --+    
                      |    
    cocosnode.CocosNode --+
                          |
             object --+   |
                      |   |
scene.EventHandlerMixin --+
                          |
                         Layer
Class that handles events and other important game's behaviors

Methods

  __init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  push_all_handlers(self)
  remove_all_handlers(self)
  on_enter(self)
Called every time just before the node enters the stage.
  on_exit(self)
Called every time just before the node leaves the stage
Inherited from cocosnode.CocosNode: __contains__, add, are_actions_running, do, draw, get, get_ancestor, get_children, 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

  is_event_handler = False
if true, the event handlers of this layer will be registered.
Inherited from cocosnode.CocosNode: anchor, anchor_x, anchor_y, children_anchor, parent, position, transform_anchor

Method Details

__init__

(Constructor) __init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides:
cocosnode.CocosNode.__init__

on_enter

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

on_exit

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

Class Variable Details

is_event_handler

if true, the event handlers of this layer will be registered. defaults to false.
Value:
False