BeginnerRudy / SWEN20003-OOSD-Shadow-Leap

Shadow Leap is a game project for the subject SWEN20003 Objected Oriented Software Development in 2018 semester 2.
0 stars 0 forks source link

Bike reverse #3

Closed BeginnerRudy closed 6 years ago

BeginnerRudy commented 6 years ago

There is bug with bike reverse direction, the bike would shocked somtimes, when it is need to reverse, looks like it is confused.

BeginnerRudy commented 6 years ago

Solved. The problem, this is a logical error. The bike would reverse direction if its x position is <24 or >1000, there are some extreme case.

For example, bike --- | --- 24

The bike would first change direction to move to the right, but at the next frame it still < 24, then it reverse again to move to left, which leads to an error.