当前位置: 首页>>代码示例>>Python>>正文


Python Player.score方法代码示例

本文整理汇总了Python中Player.score方法的典型用法代码示例。如果您正苦于以下问题:Python Player.score方法的具体用法?Python Player.score怎么用?Python Player.score使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Player的用法示例。


在下文中一共展示了Player.score方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: endround

# 需要导入模块: import Player [as 别名]
# 或者: from Player import score [as 别名]
 def endround():
     i = pygame.time.get_ticks()
    
     while (pygame.time.get_ticks() - i) < 888:
        a = 0
     p1 = Player(250, 250, math.pi/2, 20, .1, GREEN, mainsurface, time, game_arena.arena_walls)
     p1.score = p1score
     p2 = Player(550, 550, -math.pi/2, 20, .1, RED, mainsurface, time, game_arena.arena_walls)
     p2.score = p2score
     print p1.ypos
     print p2.ypos
     print "***"
     return p1, p2
开发者ID:chriswakeley,项目名称:HM,代码行数:15,代码来源:manatee.py

示例2: enter

# 需要导入模块: import Player [as 别名]
# 或者: from Player import score [as 别名]
def enter():
    global player, background, ground, hurdle, pet, hurdle_start
    global gaint_sound, collid_sound, jelly_sound, big_collid_sound, hp_sound, result_ok_sound
    #if title_state.time == True:
    hurdle = list()
    player = Player()
    background = Background()
    ground = Ground()
    pet = Pet()
    player.score = converter.player_score
    player.hpsize = converter.player_hpsize

    #Hurdle.__init__()
    ground.__init__()

    Hurdle.Hurdle_Start1 = False
    Hurdle.Hurdle_Start2 = False
    Hurdle.Hurdle_Start3 = False
    Hurdle.Hurdle_Start4 = False
    Hurdle.Hurdle_Start5 = False

    ######사운드 관련#####
    if gaint_sound == None:
        gaint_sound = load_wav('Sound\\i_giant.wav')
        gaint_sound.set_volume(32)

    if collid_sound == None:
        collid_sound = load_wav('Sound\\collide.wav')
        collid_sound.set_volume(16)

    if jelly_sound == None:
        jelly_sound = load_wav('Sound\\g_jelly.wav')
        jelly_sound.set_volume(8)

    if big_collid_sound == None:
        big_collid_sound = load_wav('Sound\\big_hit.wav')
        big_collid_sound.set_volume(32)

    if hp_sound == None:
        hp_sound = load_wav('Sound\\i_large_energy.wav')
        hp_sound.set_volume(32)

    if result_ok_sound == None:
        result_ok_sound = load_wav('Sound\\ui_2.wav')
        result_ok_sound.set_volume(32)

    #for i in range(2):          # 장애물 종류
    #    for j in range(3):      # 물체 개수
    #        hurdle.append(Hurdle(i, j))
    if hurdle_start == None:
        for i in range(len_data['Stage1_Fork']['Len']):
            hurdle.append(Hurdle(len_data['Stage1_Fork']['num'], i))
        for i in range(len_data['Stage1_Fork2']['Len']):
            hurdle.append(Hurdle(len_data['Stage1_Fork2']['num'], i))
        for i in range(len_data['Stage1_thorn']['Len']):
            hurdle.append(Hurdle(len_data['Stage1_thorn']['num'], i))
        for i in range(len_data['big_jelly']['Len']):
            hurdle.append(Hurdle(len_data['big_jelly']['num'], i))
        for i in range(len_data['item_jelly']['Len']):
            hurdle.append(Hurdle(len_data['item_jelly']['num'], i))

##############################################################################

        for i in range(len_data2['Stage1_Fork']['Len']):
            hurdle.append(Hurdle2(len_data2['Stage1_Fork']['num'], i))
        for i in range(len_data2['Stage1_thorn4']['Len']):
            hurdle.append(Hurdle2(len_data2['Stage1_thorn4']['num'], i))
        for i in range(len_data2['Stage1_thorn5']['Len']):
            hurdle.append(Hurdle2(len_data2['Stage1_thorn5']['num'], i))
        for i in range(len_data2['item_jelly']['Len']):
            hurdle.append(Hurdle2(len_data2['item_jelly']['num'], i))

################################################################################

        for i in range(len_data3['Stage1_Fork']['Len']):
            hurdle.append(Hurdle3(len_data3['Stage1_Fork']['num'], i))
        for i in range(len_data3['Stage1_Fork2']['Len']):
            hurdle.append(Hurdle3(len_data3['Stage1_Fork2']['num'], i))
        for i in range(len_data3['Stage1_thorn4']['Len']):
            hurdle.append(Hurdle3(len_data3['Stage1_thorn4']['num'], i))
        for i in range(len_data3['item_jelly']['Len']):
            hurdle.append(Hurdle3(len_data3['item_jelly']['num'], i))


################################################################################

        for i in range(len_data4['Stage1_Fork']['Len']):
            hurdle.append(Hurdle4(len_data4['Stage1_Fork']['num'], i))
        for i in range(len_data4['Stage1_Fork2']['Len']):
            hurdle.append(Hurdle4(len_data4['Stage1_Fork2']['num'], i))
        for i in range(len_data4['Stage1_thorn']['Len']):
            hurdle.append(Hurdle4(len_data4['Stage1_thorn']['num'], i))
        for i in range(len_data4['Stage1_thorn4']['Len']):
            hurdle.append(Hurdle4(len_data4['Stage1_thorn4']['num'], i))
        for i in range(len_data4['Stage1_thorn5']['Len']):
            hurdle.append(Hurdle4(len_data4['Stage1_thorn5']['num'], i))
        for i in range(len_data4['item_jelly']['Len']):
            hurdle.append(Hurdle4(len_data4['item_jelly']['num'], i))

##################################################################################
#.........这里部分代码省略.........
开发者ID:leejinsoo92,项目名称:2DPythonProgramming,代码行数:103,代码来源:main_state.py


注:本文中的Player.score方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。