将路径的第一个点设置为车的初始位置

This commit is contained in:
TurnMeOn committed 2017-12-25 10:02:28 +08:00
1 parent 21f3be331d
commit bdbcf3560c
1 file changed
+4
+4
View File
@@ -84,6 +84,10 @@ void Car::turnRight(int r, double ang)
void Car::setPath(Path *path)
{
m_path = path;
m_target = path->getNext();
m_current = m_target;
this->setPos(m_target.point);
}
int Car::getNum()