Esempio n. 1
0
def create_level(mtblock_list,mtall_sprites_list,mtplatforms):
#---LEVEL---#
    
    #bottom platform
    for bp_x in range(250,650,50):
        bp_y = 550
        platblock = blockdata.b_platform(bp_x,bp_y)
        mtplatforms.add(platblock)
        mtall_sprites_list.add(platblock)
    transblockr = blockdata.trbr(650,550)
    mtplatforms.add(transblockr)
    mtall_sprites_list.add(transblockr)
    transblockl = blockdata.trbl(200,550)
    mtplatforms.add(transblockl)
    mtall_sprites_list.add(transblockl)

    #middle left
    for bp_x in range(50,250,50):
        bp_y = 350
        platblock = blockdata.b_platform(bp_x,bp_y)
        mtplatforms.add(platblock)
        mtall_sprites_list.add(platblock)
    transblockr = blockdata.trbr(250,350)
    mtplatforms.add(transblockr)
    mtall_sprites_list.add(transblockr)
    #middle right
    for bp_x in range(650,850,50):
        bp_y = 350
        platblock = blockdata.b_platform(bp_x,bp_y)
        mtplatforms.add(platblock)
        mtall_sprites_list.add(platblock)
    transblockl = blockdata.trbl(600,350)
    mtplatforms.add(transblockl)
    mtall_sprites_list.add(transblockl)
    #top platform
    for bp_x in range(250,650,50):
        bp_y = 150
        platblock = blockdata.b_platform(bp_x,bp_y)
        mtplatforms.add(platblock)
        mtall_sprites_list.add(platblock)
    transblockr = blockdata.trbr(650,150)
    mtplatforms.add(transblockr)
    mtall_sprites_list.add(transblockr)
    transblockl = blockdata.trbl(200,150)
    mtplatforms.add(transblockl)
    mtall_sprites_list.add(transblockl)
#---------------------------------------------------------------------------#      
    for g_y in range(0,600,50):
        g_x = 0
        brickblock = blockdata.brick(g_x,g_y)
        mtblock_list.add(brickblock)
        mtall_sprites_list.add(brickblock)
    for g_y in range(0,600,50):
        g_x = 850
        brickblock = blockdata.brick(g_x,g_y)
        mtblock_list.add(brickblock)
        mtall_sprites_list.add(brickblock)
Esempio n. 2
0
def create_level(mtblock_list,mtall_sprites_list,mtplatforms):
#---LEVEL---#
    #---bottom platforms---#
    for bp_x in range(50,600,50):
        bp_y = 550
        platblock = blockdata.b_platform(bp_x,bp_y)
        mtplatforms.add(platblock)
        mtall_sprites_list.add(platblock)
    transblockr = blockdata.trbr(600,550)
    mtplatforms.add(transblockr)
    mtall_sprites_list.add(transblockr)
    #---second level platforms---#
    #---right side---#
    for bp_x in range(650,850,50):
        bp_y = 350
        platblock = blockdata.b_platform(bp_x,bp_y)
        mtplatforms.add(platblock)
        mtall_sprites_list.add(platblock)
    transblockl = blockdata.trbl(600,350)
    mtplatforms.add(transblockl)
    mtall_sprites_list.add(transblockl)
    #---left side---#
    transblockr = blockdata.trbr(50,350)
    mtplatforms.add(transblockr)
    mtall_sprites_list.add(transblockr)
#---------------------------------------------------------------------------#      
    #---Left BLOCK BORDER---#
    for g_y in range(0,600,50):
        g_x = 0
        brickblock = blockdata.brick(g_x,g_y)
        mtblock_list.add(brickblock)
        mtall_sprites_list.add(brickblock)
    #---Right BLOCK BORDER---#
    for g_y in range(0,600,50):
        g_x = 850
        brickblock = blockdata.brick(g_x,g_y)
        mtblock_list.add(brickblock)
        mtall_sprites_list.add(brickblock)