| 688 | } |
| 689 | |
| 690 | static void fixedUpdate() |
| 691 | { |
| 692 | auto& tweener = EntityTweener::get(); |
| 693 | tweener.reset(); |
| 694 | |
| 695 | if (_accumulator < UpdateTime) |
| 696 | { |
| 697 | std::this_thread::sleep_for(std::chrono::milliseconds(1)); |
| 698 | } |
| 699 | else |
| 700 | { |
| 701 | tick(); |
| 702 | _accumulator -= UpdateTime; |
| 703 | |
| 704 | Ui::render(); |
| 705 | } |
| 706 | } |
| 707 | |
| 708 | static void update() |
| 709 | { |