Example #1
0
def togglePause():
    if vars.paused:
        example.get('main').enableUpdate(True)
        example.removeByTag('shader')
    else:
        example.get('main').enableUpdate(False)
        a = Entity(pos=[0, 0, 1], tag='shader')
        a.addComponent(
            compo.ShapeGfxColor(shape=sh.Rect(256, 256),
                                fill=sh.SolidFill(r=0, g=0, b=0, a=64)))
        example.get('diag').add(a)
    vars.paused = not vars.paused
Example #2
0
def togglePause():
    if vars.paused:
        example.get('main').enableUpdate(True)
        example.removeByTag('shader')
        #msg : example.Wrap1 = example.get('msg')
        #if msg.valid:
        #    example.killScript('msgscript')
        #    example.removeByTag('msg')
        #    example.removeByTag('msgbox')
        #    example.get('player').setState('walk', {})    
    else:
        example.get('main').enableUpdate(False)
        a = Entity(pos=[0,0,1], tag='shader')
        a.addComponent (compo.ShapeGfxColor(shape = sh.Rect(256, 256), fill = sh.SolidFill(r=0, g=0, b=0, a=64)))
        example.get('diag').add(a)
    vars.paused = not vars.paused
Example #3
0
 def f():
     example.removeByTag(item_id)
Example #4
0
 def f():
     if entity_id is not None:
         example.remove(entity_id)
     else:
         example.removeByTag(tag)
Example #5
0
 def f():
     if id is not None:
         example.remove(id)
     else:
         example.removeByTag(tag)
Example #6
0
 def _remove_item():
     example.removeByTag(item_id)