|
Potato Engine
|
Helper class with useful logic and shorthand functions. More...
#include <GameplayHelper.hpp>
Static Public Member Functions | |
| static Vector2 | VecToScreenVec (const Vector2 &worldPos) |
| Converts world position to screen position. | |
| static bool | IsPositionInCameraFrame (const Vector2 &pos, Camera *camera) |
| Checks if a position is visible in the view of a camera object. | |
Helper class with useful logic and shorthand functions.
This class is uninstantiable. All helpers are static
Definition at line 11 of file GameplayHelper.hpp.
Converts world position to screen position.
World origin is game-relative (0,0). Screen origin is at the top left corner of the terminal window. Use this function to convert world coordinates to screen-relative
| worldPos | position to convert |
Definition at line 8 of file GameplayHelper.cpp.
Checks if a position is visible in the view of a camera object.
| pos | Position to check |
| camera | Camera to check for visibility |
Definition at line 14 of file GameplayHelper.cpp.