diff --git a/game/dist/assets/env/env_cars/env_carBlue.json b/game/dist/assets/env/env_cars/env_carBlue.json new file mode 100644 index 00000000..7dad39db --- /dev/null +++ b/game/dist/assets/env/env_cars/env_carBlue.json @@ -0,0 +1,65 @@ +{ + "name": "env_carBlue", + "bottom_texture": { + "file_path": "assets/env/env_cars/env_carWheels.png" + }, + "top_texture": { + "file_path": "assets/env/env_cars/env_carBlue.png" + }, + "footprint": [ + { + "position": [ + 0, + 0 + ], + "size": [ + 384, + 512 + ] + } + ], + "visualization_radius": 220.0, + "physics_colliders": [ + { + "position": [ + -107, + 113 + ], + "size": [ + 42, + 78 + ] + }, + { + "position": [ + 107, + 113 + ], + "size": [ + 42, + 78 + ] + }, + { + "position": [ + -107, + -113 + ], + "size": [ + 42, + 78 + ] + }, + { + "position": [ + 107, + -113 + ], + "size": [ + 42, + 78 + ] + } + ], + "temperature": 7.0 +} \ No newline at end of file diff --git a/game/dist/assets/env/env_cars/env_carGrey.json b/game/dist/assets/env/env_cars/env_carGrey.json new file mode 100644 index 00000000..4584d8bb --- /dev/null +++ b/game/dist/assets/env/env_cars/env_carGrey.json @@ -0,0 +1,65 @@ +{ + "name": "env_carGrey", + "bottom_texture": { + "file_path": "assets/env/env_cars/env_carWheels.png" + }, + "top_texture": { + "file_path": "assets/env/env_cars/env_carGrey.png" + }, + "footprint": [ + { + "position": [ + 0, + 0 + ], + "size": [ + 384, + 512 + ] + } + ], + "visualization_radius": 220.0, + "physics_colliders": [ + { + "position": [ + -107, + 113 + ], + "size": [ + 42, + 78 + ] + }, + { + "position": [ + 107, + 113 + ], + "size": [ + 42, + 78 + ] + }, + { + "position": [ + -107, + -113 + ], + "size": [ + 42, + 78 + ] + }, + { + "position": [ + 107, + -113 + ], + "size": [ + 42, + 78 + ] + } + ], + "temperature": 7.0 +} \ No newline at end of file diff --git a/game/dist/assets/env/env_cars/env_carOrange.json b/game/dist/assets/env/env_cars/env_carOrange.json new file mode 100644 index 00000000..34269be5 --- /dev/null +++ b/game/dist/assets/env/env_cars/env_carOrange.json @@ -0,0 +1,65 @@ +{ + "name": "env_carOrange", + "bottom_texture": { + "file_path": "assets/env/env_cars/env_carWheels.png" + }, + "top_texture": { + "file_path": "assets/env/env_cars/env_carOrange.png" + }, + "footprint": [ + { + "position": [ + 0, + 0 + ], + "size": [ + 384, + 512 + ] + } + ], + "visualization_radius": 220.0, + "physics_colliders": [ + { + "position": [ + -107, + 113 + ], + "size": [ + 42, + 78 + ] + }, + { + "position": [ + 107, + 113 + ], + "size": [ + 42, + 78 + ] + }, + { + "position": [ + -107, + -113 + ], + "size": [ + 42, + 78 + ] + }, + { + "position": [ + 107, + -113 + ], + "size": [ + 42, + 78 + ] + } + ], + "temperature": 7.0 +} \ No newline at end of file diff --git a/game/dist/assets/env/env_cars/env_tronkDark.json b/game/dist/assets/env/env_cars/env_tronkDark.json new file mode 100644 index 00000000..e2a4d907 --- /dev/null +++ b/game/dist/assets/env/env_cars/env_tronkDark.json @@ -0,0 +1,65 @@ +{ + "name": "env_tronkDark", + "bottom_texture": { + "file_path": "assets/env/env_cars/env_tronkWheels.png" + }, + "top_texture": { + "file_path": "assets/env/env_cars/env_tronkDark.png" + }, + "footprint": [ + { + "position": [ + 0, + 0 + ], + "size": [ + 384, + 640 + ] + } + ], + "visualization_radius": 220.0, + "physics_colliders": [ + { + "position": [ + -137, + -64 + ], + "size": [ + 53, + 100 + ] + }, + { + "position": [ + 137, + -64 + ], + "size": [ + 53, + 100 + ] + }, + { + "position": [ + 140, + -240 + ], + "size": [ + 53, + 100 + ] + }, + { + "position": [ + -140, + -240 + ], + "size": [ + 53, + 100 + ] + } + ], + "temperature": 7.0 +} \ No newline at end of file diff --git a/game/dist/assets/env/env_cars/env_tronkLight.json b/game/dist/assets/env/env_cars/env_tronkLight.json new file mode 100644 index 00000000..10548108 --- /dev/null +++ b/game/dist/assets/env/env_cars/env_tronkLight.json @@ -0,0 +1,65 @@ +{ + "name": "env_tronkLight", + "bottom_texture": { + "file_path": "assets/env/env_cars/env_tronkWheels.png" + }, + "top_texture": { + "file_path": "assets/env/env_cars/env_tronkLight.png" + }, + "footprint": [ + { + "position": [ + 0, + 0 + ], + "size": [ + 384, + 640 + ] + } + ], + "visualization_radius": 220.0, + "physics_colliders": [ + { + "position": [ + -137, + -64 + ], + "size": [ + 53, + 100 + ] + }, + { + "position": [ + 137, + -64 + ], + "size": [ + 53, + 100 + ] + }, + { + "position": [ + 140, + -240 + ], + "size": [ + 53, + 100 + ] + }, + { + "position": [ + -140, + -240 + ], + "size": [ + 53, + 100 + ] + } + ], + "temperature": 7.0 +} \ No newline at end of file diff --git a/game/dist/assets/env/env_market/env_marketPurple.json b/game/dist/assets/env/env_market/env_marketPurple.json index dbd3da27..f013f9ad 100644 --- a/game/dist/assets/env/env_market/env_marketPurple.json +++ b/game/dist/assets/env/env_market/env_marketPurple.json @@ -1,10 +1,10 @@ { "name": "env_marketPurple", "bottom_texture": { - "file_path": "assets/env/env_umbrella/env_marketBottom.png" + "file_path": "assets/env/env_market/env_marketBottom.png" }, "top_texture": { - "file_path": "assets/env/env_umbrella/env_marketTopPurple.png" + "file_path": "assets/env/env_market/env_marketTopPurple.png" }, "footprint": [ { diff --git a/game/dist/assets/env/env_market/env_market.json b/game/dist/assets/env/env_market/env_marketRed.json similarity index 94% rename from game/dist/assets/env/env_market/env_market.json rename to game/dist/assets/env/env_market/env_marketRed.json index d798808e..6af4805f 100644 --- a/game/dist/assets/env/env_market/env_market.json +++ b/game/dist/assets/env/env_market/env_marketRed.json @@ -1,10 +1,10 @@ { - "name": "env_market", + "name": "env_marketRed", "bottom_texture": { - "file_path": "assets/env/env_umbrella/env_marketBottom.png" + "file_path": "assets/env/env_market/env_marketBottom.png" }, "top_texture": { - "file_path": "assets/env/env_umbrella/env_marketTop.png" + "file_path": "assets/env/env_market/env_marketTop.png" }, "footprint": [ { diff --git a/game/dist/assets/env/env_market/env_marketYellow.json b/game/dist/assets/env/env_market/env_marketYellow.json index f911f0b6..545ae89d 100644 --- a/game/dist/assets/env/env_market/env_marketYellow.json +++ b/game/dist/assets/env/env_market/env_marketYellow.json @@ -1,10 +1,10 @@ { "name": "env_marketYellow", "bottom_texture": { - "file_path": "assets/env/env_umbrella/env_marketBottom.png" + "file_path": "assets/env/env_market/env_marketBottom.png" }, "top_texture": { - "file_path": "assets/env/env_umbrella/env_marketTopYellow.png" + "file_path": "assets/env/env_market/env_marketTopYellow.png" }, "footprint": [ { diff --git a/game/dist/assets/env/env_person/env_personLie1.json b/game/dist/assets/env/env_person/env_person1.json similarity index 77% rename from game/dist/assets/env/env_person/env_personLie1.json rename to game/dist/assets/env/env_person/env_person1.json index 624aef8a..a9594228 100644 --- a/game/dist/assets/env/env_person/env_personLie1.json +++ b/game/dist/assets/env/env_person/env_person1.json @@ -1,10 +1,10 @@ { - "name": "env_personLie1", + "name": "env_person1", "bottom_texture": { - "file_path": "assets/env/env_umbrella/env_blank.png" + "file_path": "assets/env/env_person/env_blank.png" }, "top_texture": { - "file_path": "assets/env/env_umbrella/env_personLie1.png" + "file_path": "assets/env/env_person/env_personLie1.png" }, "footprint":[ { diff --git a/game/dist/assets/env/env_person/env_personSit1.json b/game/dist/assets/env/env_person/env_person2.json similarity index 68% rename from game/dist/assets/env/env_person/env_personSit1.json rename to game/dist/assets/env/env_person/env_person2.json index e8e57954..b1d2c89b 100644 --- a/game/dist/assets/env/env_person/env_personSit1.json +++ b/game/dist/assets/env/env_person/env_person2.json @@ -1,10 +1,10 @@ { - "name": "env_personSit1", + "name": "env_person2", "bottom_texture": { - "file_path": "assets/env/env_umbrella/env_blank.png" + "file_path": "assets/env/env_person/env_blank.png" }, "top_texture": { - "file_path": "assets/env/env_umbrella/env_personSit1.png" + "file_path": "assets/env/env_person/env_person1.png" }, "footprint":[ { diff --git a/game/dist/assets/env/env_person/env_personSit2.json b/game/dist/assets/env/env_person/env_person3.json similarity index 68% rename from game/dist/assets/env/env_person/env_personSit2.json rename to game/dist/assets/env/env_person/env_person3.json index 316938ec..d8c9cc59 100644 --- a/game/dist/assets/env/env_person/env_personSit2.json +++ b/game/dist/assets/env/env_person/env_person3.json @@ -1,10 +1,10 @@ { - "name": "env_personSit2", + "name": "env_person2", "bottom_texture": { - "file_path": "assets/env/env_umbrella/env_blank.png" + "file_path": "assets/env/env_person/env_blank.png" }, "top_texture": { - "file_path": "assets/env/env_umbrella/env_personSit2.png" + "file_path": "assets/env/env_person/env_personSit2.png" }, "footprint":[ { diff --git a/game/dist/map_gameMap.objects.json b/game/dist/map_gameMap.objects.json index 90412890..f975c12f 100644 --- a/game/dist/map_gameMap.objects.json +++ b/game/dist/map_gameMap.objects.json @@ -38,5 +38,15 @@ 9 ], "rotation_degrees": -90 + }, + { + "type": "env", + "name": "env_Market", + "variant": "Red", + "position": [ + 14, + 119 + ], + "rotation_degrees": 90 } ] \ No newline at end of file diff --git a/game/dist/map_gameMap.tmx b/game/dist/map_gameMap.tmx index 01353e04..7f984fd0 100644 --- a/game/dist/map_gameMap.tmx +++ b/game/dist/map_gameMap.tmx @@ -3,192 +3,444 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/game/game_logic/src/scenes/player_interaction.rs b/game/game_logic/src/scenes/player_interaction.rs index b9374575..385e1182 100644 --- a/game/game_logic/src/scenes/player_interaction.rs +++ b/game/game_logic/src/scenes/player_interaction.rs @@ -272,7 +272,7 @@ impl PlayableScene { if player.position.x - player_size <= i.position.x + i.size.x / 2.0 && player.position.x + player_size >= i.position.x + i.size.x / 2.0 && player.position.y - player_size <= i.position.y + i.size.y / 2.0 - && player.position.y + player_size >= i.position.y + i.size.x / 2.0 + && player.position.y + player_size >= i.position.y + i.size.y / 2.0 { // if player.velocity.x < 0.0 { // player.position.x = i.position.x + i.size.x / 2.0 + player_size; @@ -303,13 +303,13 @@ impl PlayableScene { if player.position.x - player_size <= i.position.x + i.size.x / 2.0 && player.position.x + player_size >= i.position.x + i.size.x / 2.0 && player.position.y - player_size <= i.position.y + i.size.y / 2.0 - && player.position.y + player_size >= i.position.y + i.size.x / 2.0 + && player.position.y + player_size >= i.position.y + i.size.y / 2.0 { - if player.velocity.y < 0.0 { - player.position.y = i.position.y + i.size.y / 2.0 + player_size; - } else if player.velocity.y > 0.0 { - player.position.y = i.position.y - i.size.y / 2.0 - player_size; - } + // if player.velocity.y < 0.0 { + // player.position.y = i.position.y + i.size.y / 2.0 + player_size; + // } else if player.velocity.y > 0.0 { + // player.position.y = i.position.y - i.size.y / 2.0 - player_size; + // } player.position.y -= velocity_modifier.y; player.velocity.y = 0.0;