def on_enter(self): # handler's auto registration only happens for window's events; # we want to listen director events, so explicitly registering super(AutocenteredBackgroundLayer,self).on_enter() director.push_handlers(self.on_cocos_resize) if autotest: self.do(Delay(2.0) + CallFunc(resize) )
def on_enter(self): super(cocos_box2d_layer,self).on_enter() director.push_handlers(self.on_resize) # sprite3.do(MoveTo((620,300))) # the layer is on "stage" self.elapsed = 0
def on_enter(self): super(Flag3D, self).on_enter() # hook on resize to override the default projection with a custom one. # cocos2d's default projetion is also a 3d projection, but since this # is a demo, we show how to customize our own on_resize method. director.push_handlers(self.on_resize) # the layer is on "stage" self.elapsed = 0
def on_enter(self): super(Flag3D,self).on_enter() # hook on resize to override the default projection with a custom one. # cocos2d's default projetion is also a 3d projection, but since this # is a demo, we show how to customize our own on_resize method. director.push_handlers(self.on_resize) # the layer is on "stage" self.elapsed = 0
def __init__(self, level): super().__init__() if not isinstance(level, levels.Level): raise LevelNotFound self.level = level director.push_handlers(self) self.intro = self.LevelIntro("Level Editor", self.level.name, 0, 0, 0, 0) self.add(self.intro, z=5) events.leveleditorevents.push_handlers(self) self._changes = False self.intro.do(cocos.actions.FadeIn(0.1)) self.intro.title.do( cocos.actions.FadeOut(0.1) + cocos.actions.Delay(0.5) + cocos.actions.FadeIn(0.5)) self.intro.desc.do( cocos.actions.FadeOut(0.1) + cocos.actions.Delay(1) + cocos.actions.FadeIn(0.5) + cocos.actions.CallFunc(self.loadSceenShowing))
def on_enter(self): """Called everytime the Particle system enters the stage.""" super(ParticleSystem, self).on_enter() director.push_handlers(self)
def on_enter(self): super(ScrollingManager, self).on_enter() director.push_handlers(self.on_cocos_resize) self.update_view_size() self.refresh_focus()
def on_enter(self): director.push_handlers(self.on_cocos_resize) super(ScrollableLayer, self).on_enter()
def on_enter(self): super(BackgroundLayer, self).on_enter() director.push_handlers(self.on_resize)
def on_enter(self): """Called every time just before the node enters the stage.""" director.push_handlers(self.on_cocos_resize) super(ScrollableLayer, self).on_enter()
def on_enter(self): super(GameCtrl, self).on_enter() director.push_handlers(self.on_resize) self.elapsed = 0 self.schedule(self.step)
def on_enter(self): """"Called every time just before the node enters the stage.""" super(ScrollingManager, self).on_enter() director.push_handlers(self.on_cocos_resize) self.update_view_size() self.refresh_focus()
def on_enter(self): super(BackgroundLayer,self).on_enter() director.push_handlers(self.on_resize)
def on_enter(self): super(ParticleSystem, self).on_enter() director.push_handlers(self)
def on_enter(self): director.push_handlers(self.on_cocos_resize) super(TestScene, self).on_enter()