This commit is contained in:
Michael Chen 2018-01-11 16:47:40 +01:00
parent db5f91ccf7
commit cac2af317b
3 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -133,7 +133,7 @@ void BALL_Update(Ball * obj, Paddle * paddle){
if (BALL_CollideWithRect(obj, &(paddle->TargetRect))) {
(obj->Location) = vectorSub((obj->Location), lastMomentum); // Maybe remove this
BALL_SteerMomentum(obj, &(paddle->TargetRect));
// BALL_SteerMomentum(obj, &(paddle->TargetRect));
(obj->Location) = vectorAdd((obj->Location), (obj->Momentum)); // Maybe remove this
}

View File

@ -37,7 +37,7 @@ void BREAKOUT_DEINITIALIZE();
void BALL_Initialize(SDL_Renderer * renderer);
Ball BALL_CreateDefault();
void BALL_Draw(SDL_Renderer * renderer, Ball * obj);
bool BALL_CollideWithRect(Ball * obj, SDL_Rect * rect2);
bool BALL_CollideWithRect(Ball * obj, SDL_Rect * rect);
bool RECT_Collide(SDL_Rect * rect1, SDL_Rect * rect2);
void BALL_Update(Ball * obj, Paddle * paddle);
void BALL_DestroyObject(Ball * obj);