Beispiel #1
0
//Función para cargar al entrar en el estado de Play donde se cargan y se crean los diferentes gameobjects
bool PlayState::onEnter()
{
	LevelParser levelParser;
	//StateParser stateParser;
	map = levelParser.parseLevel("assets/map.tmx");
	//stateParser.parseState("tiny.xml", s_playID, &m_gameObjects, &m_textureIDList);
	return true;
}
Beispiel #2
0
void GameScene::loadLevelData()
{
	LevelParser parser;
	levelData = parser.parseTrollbergLevel(levelFile);
	color = levelData.color;

	levelWidth = levelData.playfield.width;

	batch = new Pim::SpriteBatchNode(levelData.batchFile);
}
Beispiel #3
0
bool PlayState::onEnter()
{
    LevelParser levelParser;
    pLevel = levelParser.parseLevel("assets/space_tilemap.tmx");

    // Parse the states file
    StateParser stateParser;
    stateParser.parseState("assets/states-config.xml", s_playID, &m_gameObjects, &m_textureIDList);
	
    std::cout << "Entering PlayState" << std::endl;
    return true;
}
Beispiel #4
0
bool PlayState::onEnter()
{
	LevelParser levelParser;
	//Parse Map File and return into pLevel
	pLevel = levelParser.parseLevel("assets/map1.tmx");

	if (pLevel != 0)
	{
		m_loadingComplete = true;
	}

	std::cout << "Entering Play State" << std::endl;
	return true;
}
Beispiel #5
0
bool PlayState::onEnter() {

	//printf("Entro en PlayState");
	// parse the state
	//StateParser stateParser;
	//stateParser.parseState("./images/miXML.xml", s_playID, &m_gObjects, &m_textureIDList);
	//m_callbacks.push_back(0);
	//setCallbacks(m_callbacks);
	
	SoundManager::Instance()->playMusic("Worldmap", -1);
	LevelParser levelParser;
	m_level = levelParser.parseLevel("./images/mapa.tmx");

	return true;
	
};
Beispiel #6
0
bool PlayState::onEnter() {

	StateParser stateParser;
	stateParser.parseState("./Data/Tiny.xml", s_playID, &m_gObjects, &m_TextureIDList);

	LevelParser levelParser;
	pLevel = levelParser.parseLevel("./Data/mapaObjetos.tmx");

	//layerParser.parseTileLayer("./Data/mapa1.tmx");
	

	m_callbacks.push_back(0);
	setCallbacks();

	SoundManager::Instance()->playMusic("play", -1);

	/*player = new Player();
	zep = new Zep();
	gordo = new Gordo();

	TextureManager::Instance()->load("Kirby.bmp", "player", Game::Instance()->getRender());
	TextureManager::Instance()->load("ZepS.bmp", "zep", Game::Instance()->getRender());
	TextureManager::Instance()->load("GordoS.bmp", "gordo", Game::Instance()->getRender());

	load = new LoaderParams(100, 100, 35, 32,10, "player",0);
	load2 = new LoaderParams(200, 200, 89, 78,4, "zep",0);
	load3 = new LoaderParams(400, 300, 50, 70,4, "gordo", 0);

	player->load(load);
	m_gObjects.push_back(player);

	zep->load(load2);
	m_gObjects.push_back(zep);

	gordo->load(load3);
	m_gObjects.push_back(gordo);*/

	

	return true;
}