Esempio n. 1
0
gboolean 
timer_anime2 ( gpointer user_data )
{

   //printf("currently_framing %d\n",currently_framing);
	printf("time %f %f %f\n", Microtime()-gtime,Microtime(),gtime);

	if((Microtime()-gtime) > 2.){
		float y = drand48();
		game_object gm = game_object(0,y);
		vgames.push_back(gm);
		gtime = Microtime();
	}

	for(int k = 0; k < vgames.size(); k++) {
		vgames[k].x += 0.01;
	}

   if(currently_anime==0){
		//lock painting
		currently_anime = 1;

		//printf("currently_framing %d\n",currently_framing);
   	GtkWidget  * widget = (GtkWidget * ) user_data;
		gtk_widget_queue_draw(GTK_WIDGET(widget));		
   }
}
Esempio n. 2
0
 void GameObjectManager::remove_game_object(uint32_t id)
 {
     auto obj = game_object(id);
     if (obj != nullptr)
     {
         remove_game_object(obj);
     }
 }