Exemplo n.º 1
0
void Manager::addEntity(Entity& entity)
{
    auto entityTypes = entity.getComponentTypes();
    for (auto t : entityTypes) {
        auto systems = getSystems(t);
        for (auto s : systems) {
            s->onAddEntity(entity);
        }
    }
    entities_.push_back(&entity);
}
Exemplo n.º 2
0
void getGameDb(gamedb* db) {
	db->nbSystems = 0;
	db->systems = NULL;
	MYSQL* conn;
	//init mysql
	conn=mysql_init(NULL);
	if(!mysql_real_connect(conn,"gamedb.ccyrykcpfupb.eu-central-1.rds.amazonaws.com","d_idea","idea1234","gamedb",0,NULL,0)) {
		printf( "Failed to connect to MySQL: Error: %s\n",mysql_error(conn));
	}
	else
	{
		//get systems
		getSystems(db, conn);
	}
	//cleanup
	mysql_close(conn);
}
Exemplo n.º 3
0
bool ftParser::parse(void)
{
    return getSystems() && assignIndexes();
}