Esempio n. 1
0
    def __init__(self):
        GameSceneBase.__init__(self)

        self._header_font = Resources.GetFont(255, 0, 0)
        self._font = Resources.GetFont(255, 255, 255)
        self._start_time = time.time()
        self._tick = -1
        self._lineup = _lineup()
        self._blacks = pygame.Surface((220, 310))
    def __init__(self):
        Game.GameSceneBase.__init__(self)
        self._fontof = Resources.GetFont(220, 220, 255)
        self._fontw = Resources.GetFont(255, 255, 255)
        self._fontr = Resources.GetFont(255, 0, 0)
        self._fonty = Resources.GetFont(255, 255, 0)
        self._fontg = Resources.GetFont(0, 255, 0)
        self._counter = 0

        self._advance = None

        pygame.mixer.music.stop()
    def __init__(self):
        GameSceneBase.__init__(self)
        pygame.mixer.music.stop()
        self.whitefont = Resources.GetFont(255, 255, 255)
        self.yellowfont = Resources.GetFont(255, 255, 0)
        self._font = Resources.TTF_Font('Kallamar/KALLAMAR.TTF', 28)

        self.counter = 0
        pygame.mixer.music.stop()
        self._story_r = None
        self._custom_r = None
        self._intro_r = None
        self._credits_r = None
        self._quit_r = None
        self._hover = NONE
Esempio n. 4
0
 def MakeText(self, color, text):
     global _useFancyRender
     if _useFancyRender:
         return FancyRender(text, color)
     else:
         font = Resources.GetFont(color[0], color[1], color[2])
         return font.Render(text).convert_alpha()
Esempio n. 5
0
 def __init__(self):
     Game.GameSceneBase.__init__(self)
     self.counter = 0
     self.font = Resources.GetFont(255, 255, 255)
     self.x = None
     self.progress = 0
     self.cacheExists = Resources.ImageLibrary.CacheExists()
     if self.cacheExists:
         Resources.ImageLibrary.PrepForLoadCache()
 def __init__(self, color, messages, playScene):
     GameSceneBase.__init__(self)
     self.playScene = playScene
     self.font = Resources.GetFont(color[0], color[1], color[2])
     self.messages = messages
     self.border = Resources.CreateBorder(400, len(messages) * 20 + 60)
     self.x = (640 - self.border.get_width()) // 2
     self.y = 50
     self.close_x = self.x + self.border.get_width() - 24
     self.close_y = self.y + 24
	def Render(self, vfps, afps):
		if self.current != None:
			self.current.Render(self.screen)
			
			if self.show_fps_counter:
				if self.font == None:
					self.font = Resources.GetFont(255, 255, 255)
				text = self.font.Render("FPS: " + str(vfps))
				self.screen.blit(text, (4, 480 - text.get_height()))
			pygame.display.flip()
Esempio n. 8
0
	def __init__(self, currentScene):
		Game.GameSceneBase.__init__(self)
		self.previousScene = currentScene
		self.bg = pygame.Surface((640, 480))
		
		self._fontw = Resources.GetFont(255,255,255)
		self._fontr = Resources.GetFont(255,0,0)
		self._fonty = Resources.GetFont(255,255,0)
		self._counter = 0
		
		pygame.mixer.music.stop()
		
		self.line1 = self.Concat([
			self.MakeText("Despite your efforts people remained "),
			self.MakeText("terrified", YELLOW),
			self.MakeText(" of the past,")
		])
		self.line2 = self.MakeText("insistent that learning from it meant forsaking all it contained ")
		self.line3 = self.Concat([
			self.MakeText("out of "),
			self.MakeText("fear", RED),
			self.MakeText(" of repeating its mistakes.")
		])
		self.line4 = self.MakeText("GAME OVER", RED)
    def __init__(self, levelSeed):
        GameSceneBase.__init__(self)
        self.tileWidth = levelSeed.width
        self.tileHeight = levelSeed.height
        self.level = GamePlay.Level(levelSeed)
        self.levelSeed = levelSeed
        self.selection_indicator = Resources.ImageLibrary.Get(
            'selection_indicator.png')
        self.cameraX = 0
        self.cameraY = 0
        self.dragStart = None
        self.selection = []
        self.topmenu = pygame.Surface((640, 20))
        self.topmenu.fill((40, 40, 40))
        pygame.draw.rect(self.topmenu, (128, 128, 128),
                         pygame.Rect(0, 18, 640, 2))
        self.topmenu.set_alpha(200)
        self.cursorLogicalPosition = (0, 0)
        self.cursorScreenPosition = (0, 0)
        self.suppressDragDraw = True
        self.counter = 0
        self.progress = 0.0
        self.specializer = GamePlay.GetSpecializer(self.levelSeed.specialName)
        self.auxillaryCounter = 0

        self.seconds = -1
        try:
            self.seconds = self.levelSeed.minutes
            if self.seconds != -1:
                self.seconds = self.seconds * 60
        except:
            pass

        self.font_white = Resources.GetFont(255, 255, 255)
        self.font_red = Resources.GetFont(255, 0, 0)
        self.font_orange = Resources.GetFont(255, 128, 0)
        self.font_yellow = Resources.GetFont(255, 255, 0)
        self.font_green = Resources.GetFont(0, 255, 0)
        self.font_blue = Resources.GetFont(0, 170, 255)

        self.specializer.DoSetup(self, self.level)
        self.CenterCameraOnColorSprites()