Esempio n. 1
0
 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))
Esempio n. 2
0
 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)
Esempio n. 3
0
 def __init__(self, x, y, rgb):
     self.x = x
     self.y = y
     self.rgb = rgb
     self.mcol = rgb
     self.img = Img.imgret("MachBlock.png")
     pygame.draw.rect(self.img, rgb, pygame.Rect(4, 4, 8, 8))
     self.img = pygame.transform.scale2x(self.img)
     self.output = []
Esempio n. 4
0
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))
Esempio n. 5
0
 def __init__(self,num):
     self.cost=0
     self.gui=HelpGUI(Img.imgret("Tutorial/"+str(num)+".png"))
Esempio n. 6
0
@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:
Esempio n. 7
0
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: