comparison examples/tank/tank_main.c @ 156:2aad042b30a4

Bullet would be detected to hit a wall (not mud). 1. It will hide bullet before remove it. 2. The program should not be removed until shapes are redrawed.
author Thinker K.F. Li <thinker@branda.to>
date Wed, 01 Oct 2008 14:58:27 +0800
parents 6749f6639924
children 5cd12609a5c7
comparison
equal deleted inserted replaced
155:6749f6639924 156:2aad042b30a4
343 bullet = tank->bullet; 343 bullet = tank->bullet;
344 rdman = bullet->rdman; 344 rdman = bullet->rdman;
345 345
346 if(bullet->hit_tmr != NULL) 346 if(bullet->hit_tmr != NULL)
347 mb_tman_remove(bullet->tman, bullet->hit_tmr); 347 mb_tman_remove(bullet->tman, bullet->hit_tmr);
348
349 coord_hide(bullet->coord_pos);
350 rdman_coord_changed(rdman, bullet->coord_pos);
348 351
349 /*! \todo Simplify the procdure of using observer pattern. */ 352 /*! \todo Simplify the procdure of using observer pattern. */
350 factory = rdman_get_ob_factory(rdman); 353 factory = rdman_get_ob_factory(rdman);
351 redraw = rdman_get_redraw_subject(rdman); 354 redraw = rdman_get_redraw_subject(rdman);
352 bullet->ob_redraw = 355 bullet->ob_redraw =