Пример #1
0
def init():
    font.init()
    img.init()
    anim.init()
    menu.init()
    instruct.init()
    game.init()
    map.init()
    end.init()
    director.director.push(menu.menu_scene)
Пример #2
0
def init():
	font.init()
	img.init()
	anim.init()
	menu.init()
	instruct.init()
	game.init()
	map.init()
	end.init()
	director.director.push(menu.menu_scene)
Пример #3
0
        break
    screen.blit(intro_text, (0, 0))
    pygame.display.flip()


def LoadMap(uPos):
    global g_cm, world, terrain
    g_cm = mapManager.getMap(uPos)
    world = g_cm.world
    terrain = g_cm.terrain


evt = rgine.Event()
wm = rgine.windows.WindowsManager(ScreenSize)

maps.init(ScreenSize, textureSize)
mapManager = maps.MapManager()
for i in base.maps:
    mapManager.add(maps.Map(*i))

terrain = base.init_terrain("1399339488.terrain", "myTexture.texture", True,
                            textureSize)
terrain.readTextureFromSurface(pygame.image.load("1399339488.jpeg"))
terrain.readTextureProperty("1399648062.textureProperty")
terrain.setProperty(0, 1, 255)
terrain.setProperty(1, 0, 255)
mapManager.add(maps.Map(terrain, (4, 4)))

pManager = base.PlayerManager(libpkmon.player, terrain, base.playerEvent,
                              base.npcs)
pManager.getPlayer().setPos(5 + 4, 10 + 4)
Пример #4
0
        def Release():
                global pEventList
                pManager.release()
                for i in pEventList: i.release(wm)
                pEventList = []
                if runningNpcEvent.isRunning(): runningNpcEvent.release(wm)
                uMenu.release(wm)
                uBattle.release(wm)
                wm.Release()
                pygame.quit()


        evt = rgine.Event()
        wm = rgine.windows.WindowsManager(ScreenSize)

        maps.init(ScreenSize, textureSize, os.path.join("BattleBackground"))
        mapManager = maps.MapManager()
        for i in base.maps:
                mapManager.add(maps.Map(*i))

        # terrain = base.init_terrain("Villiage1.terrain", "myTexture.texture", True, textureSize)
        # terrain.readTextureFromSurface(pygame.image.load("Villiage1.jpeg"))
        # terrain.readTerrainProperty("Villiage1.terrainProperty")
        # mapManager.add(maps.Map(terrain, (0, 0)))

        # uPos: [direction, newPos]
        # Map Id Starts From 0
        # Map Pos Formula: ((mapid%3-1)*100, (mapid-1)//3*100)
        # Example: mapid = 8 -> x: 100, 200

        def getMapOffset(mapid): return mapid%3*100, mapid//3*100
Пример #5
0
    "forward": map.forward,
    "back": map.backwards,
    "right": map.right,
    "left": map.left,
    "5": characters.game_rest_player,
    "8": map.forward,
    "2": map.backwards,
    "6": map.right,
    "4": map.left,
    "save": save,
    "load": load,
    "coins": player_get_money,
    "player": player_info,
    "skill": characters.skills,
    "shop": characters.shop,  # pass player
    "inv": characters.inv,
    "use": characters.invenv_use
}

dealercommands = {}

if __name__ == "__main__":

    map.init(10, 10)
    print("Type -help- to list the available commands, works in modules to")
    game_load()
    # print(type(characters.PLAYER[characters.NAME]), characters.PLAYER[characters.NAME])

    while True:
        eingabe()
Пример #6
0
	except:
		# exit(0)
		break
	screen.blit(intro_text, (0, 0))
	pygame.display.flip()

def LoadMap(uPos):
	global g_cm, world, terrain
	g_cm = mapManager.getMap(uPos)
	world = g_cm.world
	terrain = g_cm.terrain

evt = rgine.Event()
wm = rgine.windows.WindowsManager(ScreenSize)

maps.init(ScreenSize, textureSize)
mapManager = maps.MapManager()
for i in base.maps:
	mapManager.add(maps.Map(*i))

terrain = base.init_terrain("1399339488.terrain", "myTexture.texture", True, textureSize)
terrain.readTextureFromSurface(pygame.image.load("1399339488.jpeg"))
terrain.readTextureProperty("1399648062.textureProperty")
terrain.setProperty(0, 1, 255)
terrain.setProperty(1, 0, 255)
mapManager.add(maps.Map(terrain, (4, 4)))

pManager = base.PlayerManager(libpkmon.player, terrain, base.playerEvent, base.npcs)
pManager.getPlayer().setPos(5+4, 10+4)

LoadMap(pManager.getPlayer().getPos())