12 lines
181 B
C++
12 lines
181 B
C++
|
#include "fish.h"
|
||
|
|
||
|
|
||
|
void Fish::animate(float dt) {
|
||
|
position += velocity * dt;
|
||
|
}
|
||
|
|
||
|
|
||
|
bool Fish::isCloseTo(const QVector3D &point) {
|
||
|
return position.distanceToPoint(point) < range;
|
||
|
}
|