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


Python Img.imgret方法代码示例

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


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

示例1: __init__

# 需要导入模块: import Img [as 别名]
# 或者: from Img import imgret [as 别名]
 def __init__(self, x, y,owner, fent):
     self.x = x
     self.y = y
     self.owner=owner
     self.ent=fent
     simg=pygame.transform.scale(self.ent.img,(16,16))
     self.img.blit(simg,(4,8))
     self.img.blit(Img.imgret("Tutorial\Psign.png"),(16,8))
开发者ID:Nouranium,项目名称:Monolith,代码行数:10,代码来源:Tutorial.py

示例2: __init__

# 需要导入模块: import Img [as 别名]
# 或者: from Img import imgret [as 别名]
 def __init__(self, x, y, rgb):
     self.x = x
     self.y = y
     self.ileft = 10
     self.rgb = rgb
     self.img = Img.imgret("GoldBlock.png")
     pygame.draw.rect(self.img, rgb, pygame.Rect(4, 4, 8, 8))
     self.img = pygame.transform.scale2x(self.img)
开发者ID:NoNotCar,项目名称:monolith,代码行数:10,代码来源:RGB.py

示例3: range

# 需要导入模块: import Img [as 别名]
# 或者: from Img import imgret [as 别名]
Created on 14 Jun 2015
"All The Latest Gadgets"
@author: NoNotCar
'''
import Object
import Img
import pygame
import GUI
import Buyers
import GameRegistry
import Crafting

convimgs = []
slowconvimgs = []
rainconvimgs = []
baseimg = Img.imgret("Conv/ConvBase.png")
sbaseimg = Img.imgret("Conv/ConvBaseSlow.png")
rbaseimg = Img.imgret("Conv/ConvBaseRain.png")
plusimg = Img.imgret("Conv/ConvPlus.png")
splusimg = Img.imgret("Conv/SlowConvPlus.png")
rplusimg = Img.imgret("Conv/RainConvPlus.png")
dirconv = [[-1, 0], [0, 1], [1, 0], [0, -1]]
odirconv = [[0, -1], [-1, 0], [0, 1], [1, 0]]
idirconv = [[0, 1], [1, 0], [0, -1], [-1, 0]]
for bi, imgs, pimg in [(baseimg, convimgs, plusimg), (sbaseimg, slowconvimgs, splusimg),
                       (rbaseimg, rainconvimgs, plusimg)]:
    for ani in range(14):
        bit1 = pimg.subsurface(pygame.Rect(0, 0, ani, 10))
        bit2 = pimg.subsurface(pygame.Rect(ani, 0, 14 - ani, 10))
        newimg = bi.copy()
        newimg.blit(bit1, (15 - ani, 3))
开发者ID:NoNotCar,项目名称:monolith,代码行数:33,代码来源:Mech.py

示例4: imgret2

# 需要导入模块: import Img [as 别名]
# 或者: from Img import imgret [as 别名]
@author: NoNotCar
'''
import Players
from Img import imgret2
import Img
from random import randint, choice
from Terrain import terrlist
import Object
import Generators
import Tutorial
import pygame
# util
e = enumerate
selimage = imgret2("Mouse.png")
border = imgret2("MenuWrapper.png")
picon = Img.imgret("PowerIcon.png")
border2 = pygame.transform.rotate(border, 90)
ranconv = {32: (1, 7), 64: (1, 1), 128: (4, 1)}


def cmenu(menu, select):
    return [menu[(select + n) % len(menu)] for n in range(-3, 4)]


class World(object):
    def __init__(self, np, wgen, puz, pn, ps, kp, godmode, size=(32, 32)):
        self.guitorun = None
        self.puz = puz
        if puz == 2:
            generator = Tutorial.tutorials[pn]
        elif puz:
开发者ID:NoNotCar,项目名称:monolith,代码行数:33,代码来源:World.py

示例5:

# 需要导入模块: import Img [as 别名]
# 或者: from Img import imgret [as 别名]
import World
import Generators
import Img
import GUI
import Tutorial

pygame.display.set_icon(Img.imgret2("Monolith.png"))
pygame.display.set_caption("monolith")
numplayers = 1
wgen = 0
pset = 0
puzzles = 0
pnum = 0
c = pygame.time.Clock()
Img.musply("Planets/1. Mars.ogg")
nland = Img.imgret("NiceLand.png")
rgb = [200, 255, 255]
tick = 0
cont = True
kp = True
# titlescreen
srect = pygame.Rect(0, 0, 0, 0)
prect = pygame.Rect(0, 0, 0, 0)
grects = []
wsizemod = 0
wsrects = []
psrects = []
godmode = False
tutorial = False
tutb = pygame.Rect(0, 0, 0, 0)
while cont:
开发者ID:NoNotCar,项目名称:monolith,代码行数:33,代码来源:monolith.py


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