
from .packages import PackageManager
from direct.showbase.ShowBase import ShowBase
from panda3d.core import WindowProperties, TextureStage

class Game(ShowBase):
	def __init__(self, packages):
		ShowBase.__init__(self)
		#self.disableMouse()

		self.fs = PackageManager()
		for package in packages:
			self.fs.include(package)

		mdl2 = self.fs.find_model('$/arrangements/arrange3.glb')
		mdl2.reparentTo(render)
		mdl2.find('origin/wall').setTexture(self.fs.find_texture('$/generic_noise.png'))

		mdl_missing = self.fs.find_model('main-assetsz/sword1/sword1.glb')
		print(mdl_missing)
		mdl_missing.reparentTo(render)

		winprops = WindowProperties()
		winprops.setSize(1600, 900)
		self.win.requestProperties(winprops)

def start_game(packages):
	if not packages:
		packages = []
	game = Game(packages)
	game.run()
	

