* Moves further in the trajectory. * @return false if the trajectory is finished - no new position exists in the trajectory. */
| 329 | * @return false if the trajectory is finished - no new position exists in the trajectory. |
| 330 | */ |
| 331 | bool Projectile::move() |
| 332 | { |
| 333 | for (int i = 0; i < _speed; ++i) |
| 334 | { |
| 335 | _position++; |
| 336 | if (_position == _trajectory.size()) |
| 337 | { |
| 338 | _position--; |
| 339 | return false; |
| 340 | } |
| 341 | } |
| 342 | return true; |
| 343 | } |
| 344 | |
| 345 | /** |
| 346 | * Gets the current position in voxel space. |