added collisions

This commit is contained in:
DarthMooMancer
2025-10-19 12:16:32 -04:00
parent 023b638e54
commit 1524fa9d4f
3 changed files with 13 additions and 23 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ int main() {
player.set_velocity_y(player.get_velocity().y + player.m_acceleration);
player.rect.move({0, player.get_velocity().y});
test_square.set_velocity_y(player.get_velocity().y + 1);
test_square.set_velocity_y(test_square.get_velocity().y + 1);
if(test_square.get_velocity().x > 0) {
test_square.set_velocity_x(test_square.get_velocity().x - 1);
}