Example #1
0
	def check_clicked():
		global radius_circle_eye, counter_seed, lose, win, array_point, array_size_point, array_full_point, array_id_line, next_symbol, reducing, start, reset
		if not input.get_mouse().WasButtonDown(gs.InputDevice.Button0) and input.mouse_button_down():
			counter_seed = 0
			lose = False
			win = False
			array_point = []
			array_size_point = []
			array_full_point = []
			array_id_line = []
			next_symbol = True
			reducing = 0.0
			start = True
			reset = True
Example #2
0
	# check all full
	all_checked = True
	for is_full in array_full_point:
		if not is_full:
			all_checked = False
	if all_checked:
		reducing = 5.0
		next_symbol = True

	if start:
		render.text2d(3.0*size_pixel.x, size.y/7*6, "Finish the ritual to close\nthe demon's portal !", 6.5*size_pixel.x, gameboy_palette[2], font_path="Early GameBoy.ttf")
		render.text2d(31.25*size_pixel.x, size.y/7*1.5, "Easy", 8.5*size_pixel.x, gameboy_palette[2], font_path="Early GameBoy.ttf")
		render.text2d(31.25*size_pixel.x, size.y/7*1, "Hard", 8.5*size_pixel.x, gameboy_palette[2], font_path="Early GameBoy.ttf")
		render.text2d(31.25*size_pixel.x, 10, "Exit", 8.5*size_pixel.x, gameboy_palette[2], font_path="Early GameBoy.ttf")
		if not input.get_mouse().WasButtonDown(gs.InputDevice.Button0) and input.mouse_button_down():
			easy_rect = gs.fRect(31.25*size_pixel.x, size.y/7*1.5, 31.25*size_pixel.x + 31.25*size_pixel.x, size.y/7*1.5 + 8.5*size_pixel.x)
			hard_rect = gs.fRect(31.25*size_pixel.x, size.y/7*1, 31.25*size_pixel.x + 31.25*size_pixel.x, size.y/7*1 + 8.5*size_pixel.x)
			exit_rect = gs.fRect(31.25*size_pixel.x, 10, 31.25*size_pixel.x + 31.25*size_pixel.x, 10 + 8.5*size_pixel.x)
			if easy_rect.Inside(input.get_mouse_pos()[0], input.get_mouse_pos()[1]):
				start = False
				reset = False
				reduce_speed = 15
				increase_speed = 15
			if hard_rect.Inside(input.get_mouse_pos()[0], input.get_mouse_pos()[1]):
				start = False
				reset = False
				reduce_speed = 10
				increase_speed = 25
			if exit_rect.Inside(input.get_mouse_pos()[0], input.get_mouse_pos()[1]):
				exit = True