Beispiel #1
0
def mpmpfempmf():
	return
	if field == 'start':
		# Set all globalDicts based on fields
		logic.globalDict['stage'] = own['stages'][0]
		logic.globalDict['party1'] = own['party1'][0]
		logic.globalDict['party2'] = own['party2'][0]
		# 'players' must be handled a little differently

		# Start battlefield
		path = logic.expandPath('battlefield.blend')
		logic.startGame(path)

	elif field == 'party1' or field == 'party2':
		screen1 = objectControl.getFromScene('screen1', 'main')
		screen1.worldPosition.z += 1.5
Beispiel #2
0
def select(own):
	field = FIELDS[ own['fieldNum'] ]

	if field == 'start':
		# Set all globalDicts based on fields
		logic.globalDict['stage'] = own['stages'][0]
		logic.globalDict['party1'] = own['party1'][0]
		logic.globalDict['party2'] = own['party2'][0]
		# 'players' must be handled a little differently

		# Start battlefield
		path = logic.expandPath('battlefield.blend')
		logic.startGame(path)

	elif field == 'party1' or field == 'party2':
		# TODO(kgeffen) Implement character/party creation
		return

		# Set name of party being dealt with
		logic.globalDict['party'] = own[field][0]

		logic.addScene('partyCreate')
		logic.getCurrentScene().suspend()
Beispiel #3
0
def openBlend(map, scn=None):
    gd = logic.globalDict

    if map == "RESUME":
        if "NEWLEVEL" not in base.WORLD:
            return
        map = base.WORLD["NEWLEVEL"]
        scn = base.WORLD["NEWSCENE"]
        blend = "MAPS\\" + map
    elif map == "LAUNCHER":
        blend = config.LAUNCHER_BLEND + ".blend"
    elif map == "KEYMAP":
        blend = config.KEYMAP_BLEND + ".blend"
    else:
        base.WORLD["NEWLEVEL"] = map
        base.WORLD["NEWSCENE"] = scn
        blend = "MAPS\\" + map

    gd["TRAVELING"] = True

    for cls in logic.UPDATELIST:
        if cls.UPDATE == True:
            cls.doUpdate()
    for cls in logic.PLAYERLIST:
        if cls.UPDATE == True:
            cls.doUpdate()
    if logic.VIEWPORT != None:
        logic.VIEWPORT.doUpdate()
    logic.UPDATELIST = []

    print("OPEN MAP:\n\t" + blend)

    if config.UPBGE_FIX == True:
        settings.SaveJSON(gd["DATA"]["GAMEPATH"] + "gd_dump", gd, "\t")
    logic.startGame(gd["DATA"]["GAMEPATH"] + blend)
    base.GAME_STATE = "BLEND"
Beispiel #4
0
	def changeLevel(self):
		logic.startGame("//../levels/" + self.nextLevelName + ".blend")
Beispiel #5
0
def game_back():
	logic.startGame(BLEND_BROWSE)
Beispiel #6
0
def keyboard(cont):
    owner = cont.owner
    sensor = cont.sensors["s_keyboard"]
    #sensor = G.keyboard.events

    if sensor.positive:
        keylist = sensor.events

        for key in keylist:
            value = key[0]

            if value == GK.F1KEY:
                G.setLogicTicRate(1)

                G.startGame(r"..\CircleStim\CircleStim180.blend")
            elif value == GK.F2KEY:
                G.setLogicTicRate(1)
                G.startGame(r"..\CircleStim\blackwhite.blend")
            elif value == GK.F3KEY:
                G.setLogicTicRate(1)
                G.startGame(r"..\MultiLoader\Terrain.blend")
            elif value == GK.F4KEY:
                G.setLogicTicRate(1)
                G.startGame(r"..\MultiLoader\TerrainDome.blend")
            elif value == GK.F5KEY:
                G.setLogicTicRate(1)
                G.startGame(r"..\Test\BeachSkydomeFrameCounterVideoTeapot912X1140.180Hz.blend")
            elif value == GK.F6KEY:
                G.setLogicTicRate(1)
                G.startGame(r"..\Test\RotatingSpheres.blend")
Beispiel #7
0
import bpy

bpy.context.scene.render.engine = 'BLENDER_GAME'
bpy.ops.view3d.game_start()

from bge import logic as GameLogic
GameLogic.startGame()