int main(int argc, char** argv) { QApplication* App = new QApplication(argc,argv); InGame* IG = new InGame(WIDTH,HEIGHT); IG->init(); IG->show(); return App->exec(); }
void Start::on_btnLoad_clicked(){ World::getInstance()->setFile(true); InGame* gameScreen = new InGame(this); for (QObject *obj : server->children()){ QTcpSocket *anotherSock = dynamic_cast<QTcpSocket*>(obj); if (anotherSock != NULL){ QString str = "start"; anotherSock->write(str.toLocal8Bit()+"\n"); } } gameScreen->show(); timer->start(); this->hide(); }