Made map data xml tag more specific (output width and height as values). Add load level functionality, changes world size.
This commit is contained in:
+2
-2
@@ -221,11 +221,11 @@ void Player::Update(float fElapsedTime){
|
||||
vel.y=std::min(0.f,vel.y+friction*fElapsedTime);
|
||||
}
|
||||
float newX=pos.x+vel.x*fElapsedTime;
|
||||
if(newX-12*size>0&&newX+12*size<game->WORLD_SIZE.x*24){
|
||||
if(newX-12*size>0&&newX+12*size<game->GetWorldSize().x*24){
|
||||
pos.x=newX;
|
||||
}
|
||||
float newY=pos.y+vel.y*fElapsedTime;
|
||||
if(newY-12*size>0&&newY+12*size<game->WORLD_SIZE.y*24){
|
||||
if(newY-12*size>0&&newY+12*size<game->GetWorldSize().y*24){
|
||||
pos.y=newY;
|
||||
}
|
||||
if(attack_cooldown_timer==0&&game->GetMouse(0).bHeld){
|
||||
|
||||
Reference in New Issue
Block a user