Пример #1
0
from core import behavior, utils, module, key, media
from script import credits, constant

class IntroScene(behavior.Scene):
	def init(self):
		if constant.GAME_DEBUG == False: credits.IntroCredits()
		else: module.scene_gui.objects["GUIBlackScreen"].color.w = 0
		module.window.hideCursor()
		utils.setFilter2D("FXAA", self.scene.active_camera, 0)
		utils.setFilter2D("ChromaticAberration", self.scene.active_camera, 1)
		
		self.camtrack = self.objects["IntroCamera"]
		#self.camtrack.playAction("IntroCameraAction", 0, 2000)
		self.addBehavior(behavior.MouseLook, self.camtrack)
		utils.setCamera(self, "IntroCamera")
		
		#Subtitles
		self.subs = media.Subtitles(module.labels["Subtitles"], "gui/Star Trek.srt")
		
		
	def update(self):
		pass

	def onExit(self):
		pass

#This tells BGECore to use the ExampleScene behavior when the scene "Main" is loaded.
behavior.addScene(IntroScene, "Intro")
Пример #2
0
            MainMenu.fadeinref = sequencer.LinearInterpolation(
                0, 1, 2, MainMenu.xcolor)

    def startGame(self):
        dynamic.loadScene("scene/intro.blend", "Intro")

    def startEditor(self):
        dynamic.loadLevelEditor()
        self.objects["GUIBlackScreen"].color.w = 0

    def update(self):
        module.labels["CreditName"].rotation.z += 0.01
        pass


behavior.addScene(GUI, constant.CORE_SCENE_GUI)


class MainMenu(interface.TextMenu):
    font = "Amble"
    size = 32
    over = "MItemOver"
    align = interface.label.ALIGN_CENTER
    visible = True
    fadeinref = None

    def init(self):
        media.sui["select"] = media.AudioEffect("sound/ui/select.wav")
        media.sui["click"] = media.AudioEffect("sound/ui/click_back.wav")
        self.color = [1, 1, 1, 0]
        self.obj.visible = True
Пример #3
0
		if constant.GAME_DEBUG == True:
			MainMenu.xcolor(1)
		else: MainMenu.fadeinref = sequencer.LinearInterpolation(0, 1, 2, MainMenu.xcolor)

	def startGame(self):
		dynamic.loadScene("scene/intro.blend", "Intro")

	def startEditor(self):
		dynamic.loadLevelEditor()
		self.objects["GUIBlackScreen"].color.w = 0

	def update(self):
		module.labels["CreditName"].rotation.z += 0.01
		pass

behavior.addScene(GUI, constant.CORE_SCENE_GUI)

class MainMenu(interface.TextMenu):
	font = "Amble"
	size = 32
	over = "MItemOver"
	align = interface.label.ALIGN_CENTER
	visible = True
	fadeinref = None
	
	def init(self):
		media.sui["select"] = media.AudioEffect("sound/ui/select.wav")
		media.sui["click"] = media.AudioEffect("sound/ui/click_back.wav")
		self.color = [1, 1, 1, 0]
		self.obj.visible = True
		self.label.color = [0.8, 0.8, 0.95, 1]
Пример #4
0
from core import behavior, utils, module, key, media
from script import credits, constant


class IntroScene(behavior.Scene):
    def init(self):
        if constant.GAME_DEBUG == False: credits.IntroCredits()
        else: module.scene_gui.objects["GUIBlackScreen"].color.w = 0
        module.window.hideCursor()
        utils.setFilter2D("FXAA", self.scene.active_camera, 0)
        utils.setFilter2D("ChromaticAberration", self.scene.active_camera, 1)

        self.camtrack = self.objects["IntroCamera"]
        #self.camtrack.playAction("IntroCameraAction", 0, 2000)
        self.addBehavior(behavior.MouseLook, self.camtrack)
        utils.setCamera(self, "IntroCamera")

        #Subtitles
        self.subs = media.Subtitles(module.labels["Subtitles"],
                                    "gui/Star Trek.srt")

    def update(self):
        pass

    def onExit(self):
        pass


#This tells BGECore to use the ExampleScene behavior when the scene "Main" is loaded.
behavior.addScene(IntroScene, "Intro")