Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Camera
- {
- internal int ParentScene;
- public Vector2f SizeTop = new Vector2f(0, 0);
- public Vector2f SizeBottom = new Vector2f(0, 0);
- public Vector2f Offset = new Vector2f(0, 0);
- public bool Enabled = true;
- public Camera()
- {
- ParentScene = Game.Instance.CurrentScene;
- }
- public void Move(float x, float y)
- {
- Offset.X += x;
- Offset.Y += y;
- }
- internal bool IsIn(Vector2f sef)
- {
- if (mathf.TestRange(sef.X, SizeBottom.X, SizeTop.X) &&
- mathf.TestRange(sef.Y, SizeTop.Y, SizeBottom.Y))
- {
- return true;
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement