Beispiel #1
0
void animator_setup(animator_callback_gui_shared_info_s* common_data)
{
	debug_only("%s","animator_setup");
	ecore_animator_frametime_set(REFRESH_SPEED);
	common_data->dash_animator = ecore_animator_add(animator_rotate_dashes, common_data);
	common_data->balls_animator = ecore_animator_add(animator_spawns_balls, common_data);
	ecore_animator_freeze(common_data->dash_animator);
	ecore_animator_freeze(common_data->balls_animator);
}
Beispiel #2
0
void elitaire_object_frame_rate_set(Evas_Object * elitaire, int fr)
{
    Elitaire * eli;

    eli = (Elitaire *) evas_object_smart_data_get(elitaire);

    if (eli) {
        eli->frame_rate = fr;
        ecore_animator_frametime_set(1.0 / fr);
    }

}
Beispiel #3
0
static bool
app_create(void *data)
{
	appdata_s *ad = data;
	cairo_evasgl_drawing(ad);

	ecore_animator_frametime_set(0.016);
	ecore_animator_add(_animate_cb, (void *)ad->img);

	eext_rotary_event_handler_add(_rotary_handler_cb, ad);
	return true;
}
void Animator::setFrameTime( double frametime )
{
  ecore_animator_frametime_set( frametime );
}
void Application::setAnimationInterval(float interval)
{
    _animationInterval = interval*1000.0f;
    ecore_animator_frametime_set(interval);
}
Beispiel #6
0
EAPI void
ede_game_start(void)
{
   Ede_Level *level;
   int row = 0, col = 0;

   D(" ");

   level = ede_level_current_get();

   ede_gui_level_selector_hide();
   ede_gui_menu_hide();

   ede_gui_level_init(level->rows, level->cols, level->towers);

   // populate the checkboard with walls, start points and home
   for (row = 0; row < level->rows; row++)
   {
      for (col = 0; col < level->cols; col++)
      {
#if LOCAL_DEBUG
         // DBG show col/row numbers
         if (row == 0)
         {
            ede_gui_cell_overlay_add(OVERLAY_BORDER_RED, row, col);
            ede_gui_cell_overlay_text_set(row, col, col, 1);
         }
         if (col == 0)
         {
            ede_gui_cell_overlay_add(OVERLAY_BORDER_RED, row, col);
            ede_gui_cell_overlay_text_set(row, col, row, 2);
         }
#endif
         //~ printf("%d\n", level->cells[row][col]);
         switch (cells[row][col])
         {
            case CELL_WALL:
               ede_gui_cell_overlay_add(OVERLAY_IMAGE_WALL, row, col);
               break;
            case CELL_START0:case CELL_START1:case CELL_START2:case CELL_START3:
            case CELL_START4:case CELL_START5:case CELL_START6:case CELL_START7:
            case CELL_START8:case CELL_START9:
               ede_gui_cell_overlay_add(OVERLAY_COLOR_RED, row, col);
               ede_gui_cell_overlay_text_set(row, col, cells[row][col] - CELL_START0, 1);
               break;
            default:
               break;
         }
      }
   }
   ede_gui_cell_overlay_add(OVERLAY_COLOR_GREEN, level->home_row, level->home_col);

   _player_lives = level->lives;
   _player_bucks = level->bucks;
   _player_score = 0;
   _play_time = 0.0;

   ede_gui_lives_set(_player_lives);
   ede_gui_bucks_set(_player_bucks);
   ede_gui_score_set(_player_score);
   ede_game_state_set(GAME_STATE_PLAYING);

   ede_wave_start();

   ecore_animator_frametime_set(1.0 / MAX_FPS);

   if (!_animator)
      _animator = ecore_animator_add(_game_loop, NULL);
}