示例#1
0
void Unit::update(v3d dir, float dt)
{
	
	v3d direction = dir.normalize();
	v3d* currentLocation = getLocation();

	setLocation(*currentLocation + (direction * speed * dt));
}
示例#2
0
void Unit::update(v3d dir, float dt)
{
	
	v3d v3Direction = dir.normalize();
	v3d* v3CurrentLocation = getLocation();

	setLocation(*v3CurrentLocation + (v3Direction * fSpeed * dt));
}