When the bullet comes in contact with the enemy nothing happens, why isn't it?
this is my code.
the is the collision_x functionCode:if(collision_x(shoot.coll, enemy.coll) == 2){ enemy.alive = false; }
thank youCode:int collision_x(SDL_Rect A, SDL_Rect B){ if(A.x <= B.w){ return 1; } if(A.w >= B.x){ return 2; } return 0; }



LinkBack URL
About LinkBacks


