本文整理汇总了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
示例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))
##################################################################################
#.........这里部分代码省略.........