| 854 | } |
| 855 | |
| 856 | void GameWorld::ProcessPointerInput() { |
| 857 | if (!gameStarted) { |
| 858 | return; |
| 859 | } |
| 860 | |
| 861 | if (!inputSystem.IsUpdated()) { |
| 862 | return; |
| 863 | } |
| 864 | |
| 865 | StaticArray<ComCamera *, 16> cameraComponents; |
| 866 | ListUpActiveCameraComponents(cameraComponents); |
| 867 | |
| 868 | // Process pointer input in reverse order. |
| 869 | for (int i = cameraComponents.Count() - 1; i >= 0; i--) { |
| 870 | ComCamera *cameraComponent = cameraComponents[i]; |
| 871 | |
| 872 | if (cameraComponent->ProcessMousePointerInput() || cameraComponent->ProcessTouchPointerInput()) { |
| 873 | break; |
| 874 | } |
| 875 | } |
| 876 | |
| 877 | StaticArray<ComCanvas *, 16> canvasComponents; |
| 878 | ListUpActiveCanvasComponents(canvasComponents); |
| 879 | |
| 880 | // Process pointer input in reverse order. |
| 881 | for (int i = canvasComponents.Count() - 1; i >= 0; i--) { |
| 882 | ComCanvas *canvasComponent = canvasComponents[i]; |
| 883 | |
| 884 | if (canvasComponent->ProcessMousePointerInput() || canvasComponent->ProcessTouchPointerInput()) { |
| 885 | break; |
| 886 | } |
| 887 | } |
| 888 | } |
| 889 | |
| 890 | Entity *GameWorld::IntersectRay(const Ray &ray, int layerMask) const { |
| 891 | Entity *minEntity = nullptr; |
no test coverage detected