Potato Engine
Loading...
Searching...
No Matches
GameplayHelper.cpp
Go to the documentation of this file.
1
2
4#include "Util/Vector2.hpp"
5
6#include "GameplayHelper.hpp"
7
9 Vector2 vec = Vector2(worldPos.x, worldPos.y).Swizzled();
10 vec.x = 23.f - vec.x;
11 return vec;
12}
13
15
16 return pos.x - camera->GetPosition().x >= 0.f && pos.x - camera->GetPosition().x < camera->GetSize().x;
17
18
19
20}
Vector2 GetSize() const
Gets size.
Definition Actor.cpp:52
Vector2 GetPosition() const
Gets position.
Definition Actor.cpp:38
Camera wrapper for rendering.
Definition Camera.hpp:13
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.
Standard 2-dimensional vector.
Definition Vector2.hpp:11
float x
X Component.
Definition Vector2.hpp:13
float y
Y Component.
Definition Vector2.hpp:15
Vector2 Swizzled() const
Definition Vector2.hpp:60