Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 'w':
- {
- y -= vely;
- col = map->vCollision(x, y, w - 2, h, tileCoordY);
- std::cout << "Player V: " << col << std::endl;
- if(col != NMAP_COLL_NONE)
- {
- std::cout << "Collided V" << std::endl;
- y = ((tileCoordY + 1) * map->getLayer(0)->getTileHeight());
- }
- }
- break;
- case 's':
- {
- y += vely;
- col = map->vCollision(x, y, w - 2, h, tileCoordY);
- std::cout << "Player V: " << col << std::endl;
- if(col != NMAP_COLL_NONE)
- {
- std::cout << "Collided V" << std::endl;
- y = (tileCoordY * map->getLayer(0)->getTileHeight()) - h;
- }
- }
- break;
Add Comment
Please, Sign In to add comment