20 lines
310 B
C++
20 lines
310 B
C++
|
//Camera class body
|
||
|
|
||
|
#include"camera.h"
|
||
|
|
||
|
void Camera::update(int playerX, int playerY){
|
||
|
//Make the camera when the player hits the middle of the screem
|
||
|
if(true) posX = playerX - 640/2;
|
||
|
//else posX = 0;
|
||
|
|
||
|
//posY = playerY;
|
||
|
};
|
||
|
|
||
|
int Camera::getPosX(){
|
||
|
return posX;
|
||
|
};
|
||
|
|
||
|
int Camera::getPosY(){
|
||
|
return posY;
|
||
|
};
|