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


Python Images.init方法代码示例

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


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

示例1: loadSinks

# 需要导入模块: import Images [as 别名]
# 或者: from Images import init [as 别名]
 def loadSinks(self):
     self.sink_list.addSink(Info.init())
     self.sink_list.addSink(Buttons.init())
     self.sink_list.addSink(Menus.init())
     self.sink_list.addSink(Images.init())
     self.sink_list.addSink(Layouts.init())
     self.sink_list.addSink(Lists.init())
     self.sink_list.addSink(Popups.init())
     self.sink_list.addSink(Tables.init())
     self.sink_list.addSink(Text.init())
     self.sink_list.addSink(Trees.init())
     self.sink_list.addSink(Frames.init())
     self.sink_list.addSink(Tabs.init())
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:15,代码来源:KitchenSink.py

示例2: loadSinks

# 需要导入模块: import Images [as 别名]
# 或者: from Images import init [as 别名]
 def loadSinks(self):
     #self.sink_list.addSink(DataTree.init())
     #self.sink_list.addSink(RecipeSystemIFACE.init())
     self.sink_list.addSink(ADViewerIFACE.init())
     self.sink_list.addSink(RecipeViewer.init())
     self.sink_list.addSink(FITSStoreFACE.init())
     self.sink_list.addSink(DisplayIFACE.init())
     self.sink_list.addSink(Info.init())
     if False:
         self.sink_list.addSink(Buttons.init())
         self.sink_list.addSink(Menus.init())
         self.sink_list.addSink(Images.init())
         self.sink_list.addSink(Layouts.init())
         self.sink_list.addSink(Lists.init())
         self.sink_list.addSink(Popups.init())
         self.sink_list.addSink(Tables.init())
         self.sink_list.addSink(Text.init())
     if False: #preserving originaly order
         self.sink_list.addSink(Frames.init())
         self.sink_list.addSink(Tabs.init())
开发者ID:pyrrho314,项目名称:recipesystem,代码行数:22,代码来源:KitchenSink.py

示例3: main

# 需要导入模块: import Images [as 别名]
# 或者: from Images import init [as 别名]
def main():
    # Initialize pygame
    # os.environ['SDL_VIDEODRIVER'] = 'windib'
    pygame.init()
    pygame.mouse.set_cursor(*pygame.cursors.tri_left)
    os.environ["SDL_VIDEO_CENTERED"] = "1"  #

    Game.framesPerSecond = 48
    Game.speedModifier = 1
    Game.autoMode = 0
    Game.balanceMode = 0
    drawTick = 0

    Game.state = STATE_INITMENU
    Game.mainMenuFont = pygame.font.Font(None, 32)
    Game.gameMenuFont = pygame.font.Font(None, 24)
    Game.enemyCountFont = pygame.font.Font(None, 24)
    Game.popUpFont = pygame.font.Font(None, 24)

    # Set the height and width of the screen
    size = [mapWidth * tileSize + rightMenuSize, mapHeight * tileSize + bottomMenuSize]
    screen = pygame.display.set_mode(size)
    screen.fill(background)
    layer = pygame.Surface(size)
    layer.set_colorkey(spritepink)
    layer.set_alpha(120)

    # Variables to tell Game what to draw
    Game.drawMouseOver = 0
    Game.drawMessage = 0
    Game.repaintMap = 0
    Game.placedTower = 0

    Game.EndLevelDraw = 0
    Game.restartWave = 0
    Game.nextWave = 0

    # Initialize the Images
    Images.init()

    # Initialize the MainMenu
    mainMenu = cMenu(
        128,
        320,
        20,
        5,
        "vertical",
        100,
        screen,
        [
            ("Campaign", 1, None),
            ("Challenge 1", 2, None),
            ("Challenge 2", 3, None),
            ("Challenge 3", 4, None),
            ("Challenge 4", 5, None),
            ("Challenge 5", 6, None),
            ("Random Level", 7, None),
            ("Exit", 8, None),
        ],
        Images.Background,
    )
    gameMenu = cMenu(
        128,
        320,
        20,
        5,
        "vertical",
        100,
        screen,
        [("Resume", 1, None), ("Back to main menu (current progress will be lost!)", 2, None)],
        Images.Background,
    )

    menubackground = Images.Background
    interfaceBGwashed = Images.InterfaceBGwashed
    InterfaceBGopaque = Images.InterfaceBGopaque
    rect_list = []

    # Initialize the map
    map = Map.Map(mapWidth, mapHeight)

    # Initialize the wave
    wave = Wave.Wave(map)

    # Initialize the Towers class
    towers = Towers.Towers(map, wave)
    wave.setTowers(towers)

    # Initialize the shot graphics
    shots = Shots()

    # Initialize the tower bar
    towerBar = TowerBar.TowerBar(0, mapHeight * tileSize, map, towers)

    # Initialize the menu
    menu = Menu.Menu(map, wave, towers)

    # Initialize the level
    Game.level = Level.Level(map, wave, towers, towerBar, menu)

#.........这里部分代码省略.........
开发者ID:pinu12345,项目名称:towerdefenseapprentissage,代码行数:103,代码来源:Game.py


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