本文整理汇总了Python中Resources.textures_for_battle_gialog_window方法的典型用法代码示例。如果您正苦于以下问题:Python Resources.textures_for_battle_gialog_window方法的具体用法?Python Resources.textures_for_battle_gialog_window怎么用?Python Resources.textures_for_battle_gialog_window使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resources
的用法示例。
在下文中一共展示了Resources.textures_for_battle_gialog_window方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Window
# 需要导入模块: import Resources [as 别名]
# 或者: from Resources import textures_for_battle_gialog_window [as 别名]
#.........这里部分代码省略.........
if cell[2] == 7:
frac = self.core.get_fraction_status(self.file, self.fraction)
self.core.change_fraction_status(self.file, self.fraction, frac[1], frac[2], frac[3], frac[4]+1, frac[5])
self.core.change_cell(cell[0], cell[1], 7, self.fraction, 0, self.file)
if cell[2] == 8:
frac = self.core.get_fraction_status(self.file, self.fraction)
self.core.change_fraction_status(self.file, self.fraction, frac[1], frac[2], frac[3], frac[4], frac[5]+1)
self.core.change_cell(cell[0], cell[1], 8, self.fraction, 0, self.file)
return False, stage,last_x,last_y,armies_lists
elif ((cell[3]== self.fraction) and (cell[4]!=0)):
list_start = self.core.load_army(self.file,self.id_army)
list_end = self.core.load_army(self.file, cell[4])
list_resoult = []
for i in range(len(list_start)-3):
if i == 0:
list_resoult.append(list_end[i])
else:
list_resoult.append(list_start[i]+list_end[i])
list_resoult.append(20)
list_resoult.append(0)
list_resoult.append(self.fraction)
self.core.change_army(self.file, list_resoult[0], list_resoult[1], list_resoult[2], list_resoult[3], list_resoult[4], list_resoult[5], list_resoult[6], list_resoult[7], list_resoult[8])
self.core.change_army(self.file, self.id_army,0,0,0,0,0,0,0,0)
cell = self.core.load_cell(self.army_coords[0],self.army_coords[1],self.file)
self.core.change_cell(self.army_coords[0],self.army_coords[1],cell[2],0,0,self.file)
self.reload_window(last_x,last_y)
# elif (((cell[2]>=7)) and (cell[4] == 0)):
# stage = 5
# return False, stage,last_x,last_y,armies_lists
else:
return False,3,last_x,self.last_y,armies_lists
def battle_dialog_window(self):
textures = self.resources.textures_for_battle_gialog_window()
first_textures = textures[0].get_rect()
first_textures.center=(450,350)
self.display.blit(textures[0],first_textures)
for i in range(3):
first_textures = textures[i+1].get_rect()
first_textures.center=(350+100*i,450)
self.display.blit(textures[i+1],first_textures)
font1 = pygame.font.SysFont("Monospace", 20, bold=True, italic=False)
pygame.display.flip()
def winrar_window(self,fraction):
textures = self.resources.textures_for_battle_gialog_window()
first_textures = textures[0].get_rect()
first_textures.center=(450,350)
font1 = pygame.font.SysFont("Monospace", 20, bold=True, italic=False)
item = u'Fraction '+str()
font1 = font1.render(item,0,(20,20,20))
self.display.blit(font1,(385,360))
def action_to_minimap_coords(self,x,y): #вернуть стартовые х и у!
self.Load_part_of_map(x,y)
cells_list,x_coord_start,y_coord_start = self.core.load_cells(x, y, self.file)
cell = Rect((800+x_coord_start*self.step_p,0+y_coord_start*self.step_p),(self.step_p*14,self.step_p*14))
self.load_cells_list()
self.Minimap()
pygame.draw.rect(self.display,(0,0,0),cell,2)
self.Maps_grid()
return x_coord_start,y_coord_start
def action_for_save(self,text):
cell = Rect((360,260),(300,200))