Cleaned up Tileson and TilemapComponent

This commit is contained in:
Alan Youngblood
2023-07-26 15:47:36 -04:00
parent 1a0bd2ea4e
commit 4b1a80ec40
3 changed files with 66 additions and 120 deletions

View File

@ -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: