Пример #1
0
 def Main_Window(self):
     self.display = pygame.display.set_mode((1280,700))
     manager = ResManager()
     pygame.display.set_icon(manager.get_image('icon.png'))
     pygame.display.set_caption("Map Editor")
     self.display.fill((200,220,100))
     pygame.display.flip()
     i = 0
Пример #2
0
 def slots_for_base(self):
     manager = ResManager()
     texture = manager.get_image("interface_bg.png")
     for i in range(3):
         first_texture = texture.get_rect()
         first_texture.center=(500,90+160*i)
         self.display.blit(texture,first_texture)
     pygame.display.update()  
            
Пример #3
0
    def Textures(self):
        manager = ResManager()
        self.textures = []
        texture = manager.get_image("grass.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
        
        texture = manager.get_image("sand.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
        
        texture = manager.get_image("dirt.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
        
        texture = manager.get_image("water.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
        
        texture = manager.get_image("tree.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
        
        texture = manager.get_image("rock.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
        
        texture = manager.get_image("lava.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
        
        texture = manager.get_image("farm.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
      
        texture = manager.get_image("mine.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
        
        texture = manager.get_image("base_blue.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
        
        texture = manager.get_image("base_red.png")
        texture = pygame.transform.scale(texture,(50,50))
        self.textures.append(texture)
                        


        pygame.display.flip() 
Пример #4
0
        # Рисуем
        screen2.blit(plambir.sprite, get_center(screen2.get_rect(), plambir.sprite.get_rect()))
        pygame.display.flip()

        # Здесь указывается максимальное количество кадров в секунду
        # возвращается время прошедшее за время ожидания.
        dt = clock.tick(40)


pygame.init()

window = pygame.display.set_mode(SIZE)
# screen = pygame.display.set_mode(SIZE)

manager = ResManager()
pygame.display.set_icon(manager.get_image("icon.png"))
pygame.display.set_caption("Citadels")

citadels = manager.get_image("logo.jpg")
citadels.convert_alpha()
window.fill((255, 255, 255))
screen.fill((255, 255, 255))

# screen.blit(citadels, get_center(screen.get_rect(), citadels.get_rect()))
# window.blit(screen, (0, 0))
#
# plambir = Transparent(citadels, 1000)
# plambir.start()
#
# loop(window, plambir)
#