Cleaned up Tileson and TilemapComponent
This commit is contained in:
@ -70,6 +70,13 @@ public:
|
||||
break;
|
||||
case SDLK_LEFT:
|
||||
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||
if(transform->position.x>Game::levelMap.x){
|
||||
transform->velocity.x = -1;
|
||||
// if(Game::playerIsGrounded){
|
||||
sprite->Play("Walk");
|
||||
// }
|
||||
sprite->spriteFlip = SDL_FLIP_NONE;
|
||||
}
|
||||
// if (playerCtrl == NULL){
|
||||
// printf("No player controller found\n");
|
||||
// } else {
|
||||
@ -81,7 +88,7 @@ public:
|
||||
// Game::pTileX
|
||||
// if(transform->position.x>0){
|
||||
|
||||
int *borders;
|
||||
/*int *borders;
|
||||
borders = Game::predictCollisions();
|
||||
float max = borders[0];
|
||||
for (int b=0;b<3;b++){
|
||||
@ -102,7 +109,7 @@ public:
|
||||
transform->velocity.x = 0;
|
||||
sprite->Play("Idle");
|
||||
sprite->spriteFlip = SDL_FLIP_NONE;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
break;
|
||||
case SDLK_RIGHT:
|
||||
|
Reference in New Issue
Block a user