Beispiel #1
0
def play_flag_scene(player, obj, x, y):
    player.vy = 0
    s = Script()
    s.add_action(act.SetState(tag='player', state='slide'))
    s.add_action(act.Move(tag='player', by=(0, obj.y - player.y), speed=50))
    s.add_action(act.SetState(tag='player', state='npcwalk', args={'direction': 1}))
    example.play(s)
Beispiel #2
0
def rise():
    player = example.get('player')
    player.setState('warp', {})
    s = Script()
    s.add_action(act.Move(speed=50, by=(0, 64), tag='player'))
    s.add_action(act.SetState(tag='player', state='walk'))
    example.play(s)
Beispiel #3
0
def warp_down(a):
    if data.globals.active_warp:
        s = Script()
        s.seq([
            act.SetState(tag='player', state='warp'),
            act.Move(speed=50, by=(0, -64), tag='player'),
            act.ChangeRoom(data.globals.active_warp)])
        example.play(s)
Beispiel #4
0
def init_score(id, x, y):
    s = Script()
    s.seq([
        act.Move(speed=50, by=(0, 48), entity_id=id),
        act.RemoveEntity(entity_id=id)])
    example.play(s)
Beispiel #5
0
def on_create_mushroom(nid, x, y, z):
    s = Script()
    s.add_action(act.Move(speed=10, by=[0, 16.1], entity_id=nid))
    s.add_action(act.SetState(entity_id=nid, state='walk'))
    example.play(s)
Beispiel #6
0
def on_create_score_100(nid, x, y, z):
    data.tils.add_score(100)
    s = Script()
    s.add_action(act.Move(speed=100, by=[0, 64], entity_id=nid))
    s.add_action(act.RemoveEntity(nid))
    example.play(s)