예제 #1
0
	def __init__(self, main_surf):

		CBase.__init__(self, main_surf)

		self.__shot = 0

		self.__name = CStr("Verzhak",36)
		self.__pres = CStr("presented:",14)
		self.__pres.set_pos((self.__pres.pos[0], self.__pres.pos[1] + self.__name.height / 2))
		self.__date = CStr("(06.08.2009)",14,only = True)
		self.__date.set_pos((rsl[0] - self.__date.width, rsl[1] - self.__date.fsize - 3))
		self.__matrix_num = 8
		self.__matrix = pygame.sprite.Group([self.__CHelloMatrix(self.__matrix_num)])
예제 #2
0
	def __init__(self, main_surf):

		CBase.__init__(self, main_surf)

		self.__font = pygame.font.Font("fonts/enc.ttf",24)

		first_sym = ord("A")
		self.__sg = ord("z") - first_sym # Symbol (generation) guard
		self.__surf = []
		for x in range(0, self.__sg + 1):
			self.__surf.append(self.__font.render(chr(first_sym + x) ,True, (30, 189, 4)))

		self.__prob = [-50, 20, -10]
		self.__step = 14

		self.__line = []
		for x in range(0, rsl[0] // self.__step):
			self.__line.append(randint(self.__prob[0], self.__prob[1]))

		self.__num_compl_shots = rsl[1] // 20
예제 #3
0
	def __init__(self, main_surf):
		
		CBase.__init__(self, main_surf)

		self.__wakeup = CStr("Wake up, Neo!", 22, font_color = (30, 189, 4), pos = (10,10))
		self.__has_you = CStr("The Matrix has you...", 22,
				font_color = (30, 189, 4), pos = (10, self.__wakeup.pos[1] + self.__wakeup.height))
		self.__rabbit = CStr("Follow the white rabbit...", 22,
				font_color = (30, 189, 4), pos = (10,self.__has_you.pos[1] + self.__has_you.height))
		self.__knock_sprite = self.__CKnock()
		self.__knock = pygame.sprite.Group([self.__knock_sprite])

		# 0 - WakeUp+Rabbit+MHY; 1 - Knock,Knock
		self.__cached_blackout = [
					(
						range(10, self.__rabbit.rect.width + 40),
						range(10, 10 + self.__wakeup.rect.height + self.__has_you.rect.height
									+ self.__rabbit.rect.height)
					),
					(
						range(self.__knock_sprite.rect.x, 570),
						range(self.__knock_sprite.rect.y, 340)
					)]

		self.__cursor = pygame.sprite.Group([self.__CCursor()])

		self.__cur_shot = 0

		self.__cached = [
			(37 + self.__wakeup.len + self.__has_you.len),
			(19 + self.__wakeup.len),
			(18 + self.__wakeup.len),
			(36 + self.__wakeup.len),
			(36 + self.__wakeup.len + self.__has_you.len),
			(74 + self.__wakeup.len + self.__has_you.len + self.__rabbit.len), # 5
			(54 + self.__wakeup.len + self.__has_you.len + self.__rabbit.len),
			(54 + self.__wakeup.len + self.__has_you.len),
			(97 + self.__wakeup.len + self.__has_you.len + self.__rabbit.len), # 8
			(73 + self.__wakeup.len + self.__has_you.len + self.__rabbit.len),
			(101 + self.__wakeup.len + self.__has_you.len + self.__rabbit.len)]