コード例 #1
0
void Robot::startActing()
{

	std::thread newRobotThread([this] {
		auto& world = RobotWorld::getRobotWorld();
		auto waypoint = world.getWayPointByName("Joost");
		auto goal = world.getGoalByName("Leon");

		stop = false;
		if (waypoint)
			drive(waypoint);
		if (goal)
			drive(goal);
	});
	robotThread.swap(newRobotThread);
}
コード例 #2
0
ファイル: Robot.cpp プロジェクト: Thomqa/robotworldTest_1610
void Robot::startActing()
{
	std::thread newRobotThread( [this]
	{	stop = false; drive();});
	robotThread.swap( newRobotThread);
}