コード例 #1
0
ファイル: main.py プロジェクト: Trofis/GGJ-GourouGame
def musique():
	global sound
	audio.init()
	sound = audio.get_mixer().Stream("@data/Guru_02.wav")
コード例 #2
0
state_ready = 2
state_fade_out = 3

state = state_fade_out

if getattr(sys, 'frozen', False):
	app_path = os.path.dirname(sys.executable)
else:
	app_path = os.path.dirname(os.path.realpath(__file__))

# gs.plus.create_workers()
gs.LoadPlugins(gs.get_default_plugins_path())
render.init(1280, 720, os.path.normcase(os.path.realpath(os.path.join(app_path, "pkg.core"))))
gs.MountFileDriver(gs.StdFileDriver("assets"), '@assets')

audio.init()

# provide access to the assets folder
data_path = os.path.normcase(os.path.realpath(app_path))
gs.GetFilesystem().Mount(gs.StdFileDriver(data_path))

render.set_blend_mode2d(render.BlendAlpha)

globals.current_scene.setup()

def fade_between_scene():
	global state, fade_percent
	if globals.prev_scene_fade != globals.current_scene:
		globals.current_scene.exit()
		# transition to the new scene
		state = state_fade_in