diff --git a/game.tscn b/game.tscn new file mode 100644 index 0000000..01ee322 --- /dev/null +++ b/game.tscn @@ -0,0 +1,14 @@ +[gd_scene load_steps=3 format=3 uid="uid://8mc82qjj5gma"] + +[ext_resource type="PackedScene" uid="uid://cfou80f4ng1q0" path="res://level.tscn" id="1_qv57y"] +[ext_resource type="PackedScene" uid="uid://dv0mokf4eogm7" path="res://princesse.tscn" id="2_0ku48"] + +[node name="game" type="Node"] + +[node name="Node2D" parent="." instance=ExtResource("1_qv57y")] +position = Vector2(1, 10) + +[node name="Princesse" parent="Node2D" instance=ExtResource("2_0ku48")] +position = Vector2(87, -430) +scale = Vector2(0.6, 0.6) +collision_mask = 28 diff --git a/level.tscn b/level.tscn new file mode 100644 index 0000000..5403dc5 --- /dev/null +++ b/level.tscn @@ -0,0 +1,227 @@ +[gd_scene load_steps=4 format=3 uid="uid://cfou80f4ng1q0"] + +[ext_resource type="Texture2D" uid="uid://bopqivn8asu8e" path="res://sprite/plateformes.png" id="1_deogq"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_oitv5"] +texture = ExtResource("1_deogq") +2:0/0 = 0 +2:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:0/0/physics_layer_0/angular_velocity = 0.0 +3:0/0 = 0 +3:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:0/0/physics_layer_0/angular_velocity = 0.0 +4:0/0 = 0 +4:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:0/0/physics_layer_0/angular_velocity = 0.0 +0:1/0 = 0 +0:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:1/0/physics_layer_0/angular_velocity = 0.0 +1:1/next_alternative_id = 3 +1:1/0 = 0 +1:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:1/0/physics_layer_0/angular_velocity = 0.0 +1:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +2:1/0 = 0 +2:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:1/0/physics_layer_0/angular_velocity = 0.0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:1/0 = 0 +3:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:1/0/physics_layer_0/angular_velocity = 0.0 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +4:1/0 = 0 +4:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:1/0/physics_layer_0/angular_velocity = 0.0 +4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:1/0 = 0 +5:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:1/0/physics_layer_0/angular_velocity = 0.0 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:1/0 = 0 +6:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:1/0/physics_layer_0/angular_velocity = 0.0 +8:1/0 = 0 +8:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +8:1/0/physics_layer_0/angular_velocity = 0.0 +8:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 0, -8, 0) +9:1/0 = 0 +9:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:1/0/physics_layer_0/angular_velocity = 0.0 +9:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-6.62913, -8, 6.27557, -8, 6.45235, 5.92202, -6.45235, 5.74524) +10:1/0 = 0 +10:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:1/0/physics_layer_0/angular_velocity = 0.0 +10:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 0.972272, -8, 0.972272) +1:2/0 = 0 +1:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:2/0/physics_layer_0/angular_velocity = 0.0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +2:2/0 = 0 +2:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:2/0/physics_layer_0/angular_velocity = 0.0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:2/0 = 0 +3:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:2/0/physics_layer_0/angular_velocity = 0.0 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +4:2/0 = 0 +4:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:2/0/physics_layer_0/angular_velocity = 0.0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:2/0 = 0 +5:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:2/0/physics_layer_0/angular_velocity = 0.0 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +1:3/0 = 0 +1:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:3/0/physics_layer_0/angular_velocity = 0.0 +1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 2, 6, 3.5, 4, 8, 2, 3, -3, -2) +2:3/0 = 0 +2:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:3/0/physics_layer_0/angular_velocity = 0.0 +2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 5, -4.5, 0.5, -4, -8, 3.5) +3:3/0 = 0 +3:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:3/0/physics_layer_0/angular_velocity = 0.0 +3:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, 1, 0.5) +4:3/0 = 0 +4:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:3/0/physics_layer_0/angular_velocity = 0.0 +4:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:3/0 = 0 +5:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:3/0/physics_layer_0/angular_velocity = 0.0 +5:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, -8, -8, -8, -8, 8, -1, 0.5) +9:3/0 = 0 +9:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:3/0/physics_layer_0/angular_velocity = 0.0 +9:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-4.68458, -8, 8, -8, 8, 8, -8, 8, -8, -3.8007) +10:3/0 = 0 +10:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:3/0/physics_layer_0/angular_velocity = 0.0 +10:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +11:3/0 = 0 +11:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:3/0/physics_layer_0/angular_velocity = 0.0 +11:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +12:3/0 = 0 +12:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:3/0/physics_layer_0/angular_velocity = 0.0 +12:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +13:3/0 = 0 +13:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:3/0/physics_layer_0/angular_velocity = 0.0 +13:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +14:3/0 = 0 +14:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:3/0/physics_layer_0/angular_velocity = 0.0 +14:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +15:3/0 = 0 +15:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:3/0/physics_layer_0/angular_velocity = 0.0 +15:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(4.68458, -8, -8, -8, -8, 8, 8, 8, 8, -3.8007, 6.8059, -8) +0:4/0 = 0 +0:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:4/0/physics_layer_0/angular_velocity = 0.0 +0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 3, -8, 3, -7, 8, -7, 8, -2.5, 8, -3, 7, -3, 7, -1, 6.5, -1, 6, 0, -5, 0, -5, -0.5, -6.5, -1, -7, -5, -8, -5) +4:4/0 = 0 +4:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:4/0/physics_layer_0/angular_velocity = 0.0 +4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, -8, -8, -8, 1.5, -3.5) +6:4/0 = 0 +6:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:4/0/physics_layer_0/angular_velocity = 0.0 +6:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:4/0 = 0 +7:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:4/0/physics_layer_0/angular_velocity = 0.0 +7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +9:4/0 = 0 +9:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:4/0/physics_layer_0/angular_velocity = 0.0 +9:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-4.68458, -8, 8, -8, 8, 8, -8, 8, -8, -3.8007) +10:4/0 = 0 +10:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:4/0/physics_layer_0/angular_velocity = 0.0 +10:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +11:4/0 = 0 +11:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:4/0/physics_layer_0/angular_velocity = 0.0 +11:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +12:4/0 = 0 +12:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:4/0/physics_layer_0/angular_velocity = 0.0 +12:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +13:4/0 = 0 +13:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:4/0/physics_layer_0/angular_velocity = 0.0 +13:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +14:4/0 = 0 +14:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:4/0/physics_layer_0/angular_velocity = 0.0 +14:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +15:4/0 = 0 +15:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:4/0/physics_layer_0/angular_velocity = 0.0 +15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(4.68458, -8, -8, -8, -8, 8, 8, 8, 8, -3.8007) +2:5/0 = 0 +2:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:5/0/physics_layer_0/angular_velocity = 0.0 +2:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:5/0 = 0 +3:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:5/0/physics_layer_0/angular_velocity = 0.0 +3:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +4:5/0 = 0 +4:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:5/0/physics_layer_0/angular_velocity = 0.0 +4:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:5/0 = 0 +5:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:5/0/physics_layer_0/angular_velocity = 0.0 +5:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +9:5/0 = 0 +9:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:5/0/physics_layer_0/angular_velocity = 0.0 +9:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +10:5/0 = 0 +10:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:5/0/physics_layer_0/angular_velocity = 0.0 +10:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +11:5/0 = 0 +11:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:5/0/physics_layer_0/angular_velocity = 0.0 +11:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +12:5/0 = 0 +12:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:5/0/physics_layer_0/angular_velocity = 0.0 +12:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +13:5/0 = 0 +13:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:5/0/physics_layer_0/angular_velocity = 0.0 +13:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +14:5/0 = 0 +14:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:5/0/physics_layer_0/angular_velocity = 0.0 +14:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +15:5/0 = 0 +15:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:5/0/physics_layer_0/angular_velocity = 0.0 +15:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:7/0 = 0 +0:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:7/0/physics_layer_0/angular_velocity = 0.0 +0:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) + +[sub_resource type="TileSet" id="TileSet_4unpf"] +physics_layer_0/collision_layer = 16 +physics_layer_0/collision_mask = 0 +sources/0 = SubResource("TileSetAtlasSource_oitv5") + +[node name="Node2D" type="Node2D"] + +[node name="TileMap" type="TileMap" parent="."] +tile_set = SubResource("TileSet_4unpf") +format = 2 +layer_0/name = "foreground" +layer_0/tile_data = PackedInt32Array(-1900564, 131072, 5, -1835028, 131072, 5, -1769492, 131072, 5, -1703956, 131072, 5, -1638420, 131072, 5, -1572884, 131072, 5, -1507348, 131072, 5, -1441812, 131072, 5, -1376276, 131072, 5, -1310740, 131072, 5, -1245204, 131072, 5, -1179668, 131072, 5, -1114132, 131072, 5, -1048596, 131072, 5, -983060, 131072, 5, -917524, 131072, 5, -851988, 131072, 5, -786452, 131072, 5, -720916, 131072, 5, -655380, 131072, 5, -589844, 131072, 5, -524308, 131072, 5, -458772, 131072, 5, -393236, 131072, 5, -327700, 131072, 5, -262164, 131072, 5, -196628, 131072, 5, -131092, 131072, 5, -65556, 131072, 5, -20, 131072, 5, 65516, 131072, 5, 131052, 131072, 5, 196588, 131072, 5, 262124, 131072, 5, 327660, 131072, 5, 393196, 131072, 5, 458732, 131072, 5, 524268, 131072, 5, 589804, 131072, 5, 655340, 131072, 5, 720876, 131072, 5, 786412, 131072, 5, 851948, 131072, 5, 917484, 131072, 5, 983020, 131072, 5, 1048556, 131072, 5, 1114092, 131072, 5, 1179628, 131072, 5, -1900563, 131072, 5, 1179629, 131072, 5, -1900562, 131072, 5, -1310738, 589824, 3, 1179630, 131072, 5, -1900561, 131072, 5, -1310737, 655360, 3, -17, 262144, 1, 65519, 262144, 2, 131055, 262144, 3, 196591, 262144, 4, 1179631, 131072, 5, -1900560, 131072, 5, -1310736, 720896, 3, -16, 327680, 1, 65520, 327680, 2, 131056, 327680, 3, 589808, 0, 4, 851952, 0, 4, 1179632, 131072, 5, -1900559, 131072, 5, -1310735, 786432, 3, 1179633, 131072, 5, -1900558, 131072, 5, -1310734, 851968, 3, 983026, 0, 4, 1179634, 131072, 5, -1900557, 131072, 5, -1310733, 917504, 3, -524301, 589824, 3, 327667, 262144, 1, 393203, 262144, 2, 458739, 262144, 3, 524275, 262144, 4, 1179635, 131072, 5, -1900556, 131072, 5, -1310732, 983040, 3, -524300, 655360, 3, 327668, 327680, 1, 393204, 327680, 2, 458740, 327680, 3, 1179636, 131072, 5, -1900555, 131072, 5, -524299, 720896, 3, 786421, 0, 4, 1179637, 131072, 5, -1900554, 131072, 5, -524298, 786432, 3, 1179638, 131072, 5, -1900553, 131072, 5, -524297, 851968, 3, 655351, 262144, 1, 720887, 262144, 2, 786423, 262144, 3, 851959, 262144, 4, 1179639, 131072, 5, -1900552, 131072, 5, -524296, 917504, 3, 196600, 0, 4, 655352, 327680, 1, 720888, 327680, 2, 786424, 327680, 3, 983032, 0, 4, 1179640, 131072, 5, -1900551, 131072, 5, -524295, 983040, 3, 1179641, 131072, 5, -1900550, 131072, 5, 1179642, 131072, 5, -1900549, 131072, 5, -1310725, 65536, 1, -1245189, 65536, 1, -1179653, 65536, 1, -1114117, 65536, 1, -1048581, 65536, 1, -983045, 65536, 1, -917509, 65536, 1, -851973, 65536, 1, -786437, 65536, 1, -720901, 65536, 1, -655365, 65536, 1, -589829, 65536, 1, -524293, 65536, 1, -458757, 65536, 1, -393221, 65536, 1, -327685, 65536, 1, -262149, 65536, 1, -196613, 65536, 2, -131077, 65536, 3, 131067, 196608, 1, 196603, 131072, 5, 262139, 131072, 5, 327675, 65536, 2, 393211, 65536, 3, 851963, 262144, 1, 917499, 262144, 2, 983035, 262144, 3, 1048571, 262144, 4, 1179643, 131072, 5, -1900548, 131072, 5, -1310724, 131072, 1, -1245188, 131072, 1, -1179652, 131072, 1, -1114116, 131072, 1, -1048580, 131072, 1, -983044, 131072, 1, -917508, 131072, 1, -851972, 131072, 1, -786436, 131072, 1, -720900, 131072, 1, -655364, 131072, 1, -589828, 131072, 1, -524292, 131072, 1, -458756, 131072, 1, -393220, 131072, 1, -327684, 131072, 1, -262148, 131072, 1, -196612, 131072, 2, -131076, 131072, 3, 131068, 196608, 1, 196604, 131072, 5, 262140, 131072, 5, 327676, 131072, 2, 393212, 131072, 3, 851964, 327680, 1, 917500, 327680, 2, 983036, 327680, 3, 1179644, 131072, 5, -1900547, 131072, 5, -1835011, 589824, 1, -1769475, 589824, 1, -1703939, 589824, 1, -1638403, 589824, 1, -1572867, 589824, 1, -1507331, 589824, 1, -1441795, 589824, 1, -1376259, 589824, 1, -1310723, 196608, 1, -1245187, 196608, 1, -1179651, 196608, 1, -1114115, 196608, 1, -1048579, 196608, 1, -983043, 196608, 1, -917507, 196608, 1, -851971, 196608, 1, -786435, 196608, 1, -720899, 196608, 1, -655363, 196608, 1, -589827, 196608, 1, -524291, 196608, 1, -458755, 196608, 1, -393219, 196608, 1, -327683, 196608, 1, -262147, 196608, 1, -196611, 196608, 2, -131075, 196608, 3, 131069, 262144, 1, 196605, 131072, 5, 262141, 131072, 5, 327677, 65536, 2, 393213, 65536, 3, 1179645, 131072, 5, -1900546, 131072, 5, -1835010, 589824, 1, -1769474, 589824, 1, -1703938, 589824, 1, -1638402, 589824, 1, -1572866, 589824, 1, -1507330, 589824, 1, -1441794, 589824, 1, -1376258, 589824, 3, -1310722, 262144, 1, -1245186, 262144, 1, -1179650, 262144, 1, -1114114, 262144, 1, -1048578, 262144, 1, -983042, 262144, 1, -917506, 262144, 1, -851970, 262144, 1, -786434, 262144, 1, -720898, 262144, 1, -655362, 262144, 1, -589826, 262144, 1, -524290, 262144, 1, -458754, 262144, 1, -393218, 262144, 1, -327682, 262144, 1, -262146, 262144, 1, -196610, 262144, 2, -131074, 262144, 3, 131070, 327680, 1, 196606, 131072, 5, 262142, 131072, 5, 327678, 131072, 2, 393214, 131072, 3, 1114110, 0, 4, 1179646, 131072, 5, -1900545, 131072, 5, -1376257, 655360, 3, -1310721, 327680, 1, -1245185, 327680, 1, -1179649, 327680, 1, -1114113, 327680, 1, -1048577, 327680, 1, -983041, 327680, 1, -917505, 327680, 1, -851969, 327680, 1, -786433, 327680, 1, -720897, 327680, 1, -655361, 327680, 1, -589825, 327680, 1, -524289, 327680, 1, -458753, 327680, 1, -393217, 327680, 1, -327681, 327680, 1, -262145, 327680, 1, -196609, 327680, 2, -131073, 327680, 3, 131071, 196608, 1, 196607, 131072, 5, 262143, 131072, 5, 327679, 196608, 2, 393215, 196608, 3, 1179647, 131072, 5, -1966080, 131072, 5, -1441792, 720896, 3, 65536, 262144, 1, 131072, 131072, 5, 196608, 131072, 5, 262144, 262144, 2, 327680, 262144, 3, 917504, 393216, 4, 983040, 196608, 2, 1048576, 196608, 2, 1114112, 131072, 5, -1966079, 131072, 5, -1441791, 786432, 3, -917503, 589824, 3, 65537, 327680, 1, 131073, 131072, 5, 196609, 131072, 5, 262145, 327680, 2, 327681, 327680, 3, 917505, 458752, 4, 983041, 262144, 2, 1048577, 262144, 2, 1114113, 131072, 5, -1966078, 131072, 5, -1441790, 851968, 3, -917502, 655360, 3, 1114114, 131072, 5, -1966077, 131072, 5, -1441789, 917504, 3, -917501, 720896, 3, -589821, 0, 4, 1114115, 131072, 5, -1966076, 131072, 5, -1441788, 983040, 3, -917500, 786432, 3, 1048580, 0, 4, 1114116, 131072, 5, -1966075, 131072, 5, -917499, 851968, 3, -131067, 0, 4, 1114117, 131072, 5, -1966074, 131072, 5, -917498, 917504, 3, -458746, 0, 4, 1048582, 393216, 4, 1114118, 131072, 5, -1966073, 131072, 5, -917497, 983040, 3, 1114119, 131072, 5, -1966072, 131072, 5, -1572856, 0, 4, -1179640, 0, 4, 1114120, 131072, 5, -1966071, 131072, 5, -786423, 0, 4, -327671, 0, 4, 9, 196608, 5, 65545, 131072, 5, 131081, 131072, 5, 196617, 131072, 5, 262153, 131072, 5, 327689, 131072, 5, 393225, 131072, 5, 458761, 131072, 5, 524297, 131072, 5, 589833, 131072, 5, 1114121, 131072, 5, -1966070, 131072, 5, 10, 131072, 5, 65546, 131072, 5, 131082, 131072, 5, 196618, 131072, 5, 262154, 131072, 5, 327690, 131072, 5, 393226, 131072, 5, 458762, 131072, 5, 524298, 131072, 5, 589834, 131072, 5, 1114122, 131072, 5, -1966069, 131072, 5, -589813, 0, 4, -65525, 131072, 5, 11, 131072, 5, 65547, 131072, 5, 131083, 131072, 5, 196619, 131072, 5, 262155, 131072, 5, 327691, 131072, 5, 393227, 131072, 5, 458763, 131072, 5, 524299, 131072, 5, 589835, 131072, 5, 1114123, 131072, 5, -1966068, 131072, 5, -1703924, 0, 4, -1114100, 0, 4, -131060, 131072, 5, -65524, 131072, 5, 12, 131072, 5, 65548, 131072, 5, 131084, 131072, 5, 196620, 131072, 5, 262156, 131072, 5, 327692, 131072, 5, 393228, 131072, 5, 458764, 131072, 5, 524300, 131072, 5, 589836, 131072, 5, 1114124, 131072, 5, -1966067, 131072, 5, -1441779, 0, 4, -655347, 589824, 3, -131059, 131072, 5, -65523, 131072, 5, 13, 131072, 5, 65549, 131072, 5, 131085, 131072, 5, 196621, 131072, 5, 262157, 131072, 5, 327693, 131072, 5, 393229, 131072, 5, 458765, 131072, 5, 524301, 131072, 5, 589837, 131072, 5, 655373, 196608, 5, 720909, 196608, 5, 786445, 196608, 5, 851981, 196608, 5, 983053, 196608, 5, 1048589, 196608, 5, 1114125, 131072, 5, -1966066, 131072, 5, -917490, 0, 4, -655346, 655360, 3, -589810, 196608, 5, -524274, 196608, 5, -262130, 196608, 5, -196594, 196608, 5, -131058, 196608, 5, -65522, 196608, 5, 14, 196608, 5, 65550, 196608, 5, 131086, 196608, 5, 196622, 196608, 5, 262158, 196608, 5, 327694, 196608, 5, 393230, 196608, 5, 458766, 196608, 5, 524302, 196608, 5, 589838, 196608, 5, 655374, 196608, 5, 720910, 196608, 5, 786446, 196608, 5, 851982, 196608, 5, 917518, 196608, 5, 983054, 196608, 5, 1048590, 196608, 5, 1114126, 131072, 5, -1966065, 131072, 5, -655345, 720896, 3, -65521, 196608, 5, 1048591, 196608, 5, 1114127, 131072, 5, -1966064, 131072, 5, -1769456, 0, 4, -1179632, 0, 4, -655344, 786432, 3, -65520, 196608, 5, 1048592, 196608, 5, 1114128, 131072, 5, -1966063, 131072, 5, -655343, 851968, 3, -65519, 196608, 5, 1048593, 196608, 5, 1114129, 131072, 5, -1966062, 131072, 5, -1507310, 0, 4, -655342, 917504, 3, -65518, 196608, 5, 458770, 196608, 5, 524306, 196608, 5, 589842, 196608, 5, 655378, 196608, 5, 720914, 196608, 5, 786450, 196608, 5, 1048594, 196608, 5, 1114130, 131072, 5, -1966061, 131072, 5, -1310701, 196608, 5, -1245165, 196608, 5, -1179629, 196608, 5, -1114093, 196608, 5, -1048557, 196608, 5, -983021, 196608, 5, -917485, 196608, 5, -851949, 196608, 5, -786413, 196608, 5, -720877, 196608, 5, -655341, 983040, 3, -65517, 196608, 5, 458771, 196608, 5, 524307, 262144, 5, 589843, 262144, 5, 655379, 262144, 5, 720915, 262144, 5, 786451, 196608, 5, 1048595, 196608, 5, 1114131, 131072, 5, -1966060, 131072, 5, -1310700, 196608, 5, -65516, 196608, 5, 196628, 196608, 5, 262164, 196608, 5, 327700, 196608, 5, 393236, 196608, 5, 458772, 196608, 5, 720916, 262144, 5, 786452, 196608, 5, 1048596, 196608, 5, 1114132, 131072, 5, -1966059, 131072, 5, -1703915, 0, 4, -1310699, 589824, 3, -458731, 131072, 5, -393195, 131072, 5, -327659, 131072, 5, -262123, 131072, 5, -65515, 196608, 5, 196629, 196608, 5, 458773, 196608, 5, 524309, 262144, 5, 589845, 262144, 5, 655381, 262144, 5, 720917, 262144, 5, 786453, 196608, 5, 1048597, 196608, 5, 1114133, 131072, 5, -1966058, 131072, 5, -1310698, 655360, 3, -458730, 131072, 5, -393194, 131072, 5, -327658, 131072, 5, -262122, 131072, 5, -196586, 131072, 5, -65514, 196608, 5, 196630, 196608, 5, 458774, 196608, 5, 524310, 196608, 5, 589846, 196608, 5, 655382, 196608, 5, 720918, 196608, 5, 786454, 196608, 5, 1048598, 196608, 5, 1114134, 131072, 5, -1966057, 131072, 5, -1310697, 720896, 3, -524265, 131072, 5, -458729, 131072, 5, -393193, 131072, 5, -327657, 131072, 5, -262121, 131072, 5, -196585, 131072, 5, -65513, 196608, 5, 196631, 196608, 5, 655383, 196608, 5, 1048599, 196608, 5, 1114135, 131072, 5, -1966056, 131072, 5, -1310696, 983040, 3, -589800, 131072, 5, -524264, 131072, 5, 196632, 196608, 5, 1048600, 196608, 5, 1114136, 131072, 5, -1966055, 131072, 5, 196633, 196608, 5, 458777, 196608, 5, 1048601, 196608, 5, 1114137, 131072, 5, -1966054, 131072, 5, 196634, 196608, 5, 458778, 196608, 5, 524314, 196608, 5, 589850, 196608, 5, 655386, 196608, 5, 720922, 196608, 5, 786458, 196608, 5, 851994, 196608, 5, 917530, 196608, 5, 983066, 196608, 5, 1048602, 196608, 5, 1114138, 131072, 5, -1966053, 131072, 5, -1900517, 196608, 5, -1834981, 196608, 5, -1769445, 196608, 5, -1703909, 196608, 5, -1638373, 196608, 5, -1572837, 196608, 5, -1507301, 196608, 5, -1441765, 196608, 5, -1376229, 196608, 5, -1310693, 196608, 5, -1245157, 196608, 5, -1179621, 196608, 5, -1114085, 196608, 5, -1048549, 196608, 5, -983013, 196608, 5, -917477, 196608, 5, -851941, 196608, 5, -786405, 196608, 5, -720869, 196608, 5, -655333, 196608, 5, -589797, 196608, 5, -524261, 196608, 5, -458725, 131072, 5, -393189, 131072, 5, -327653, 131072, 5, -262117, 131072, 5, -196581, 196608, 5, -131045, 196608, 5, -65509, 196608, 5, 27, 196608, 5, 65563, 196608, 5, 131099, 196608, 5, 196635, 196608, 5, 786459, 196608, 5, 851995, 196608, 5, 917531, 196608, 5, 983067, 196608, 5, 1048603, 196608, 5, 1114139, 131072, 5, -1966052, 131072, 5, -1310692, 589824, 4, -1245156, 589824, 5, -524260, 589824, 3, -458724, 131072, 5, -393188, 131072, 5, -327652, 131072, 5, -262116, 131072, 5, -196580, 131072, 5, -65508, 196608, 5, 196636, 196608, 5, 786460, 196608, 5, 851996, 196608, 5, 917532, 196608, 5, 983068, 196608, 5, 1048604, 196608, 5, 1114140, 131072, 5, -1966051, 131072, 5, -1310691, 655360, 4, -1245155, 655360, 5, -524259, 131072, 5, -458723, 131072, 5, -393187, 131072, 5, -327651, 131072, 5, -262115, 131072, 5, -196579, 131072, 5, -65507, 196608, 5, 196637, 196608, 5, 917533, 196608, 5, 983069, 196608, 5, 1048605, 196608, 5, 1114141, 131072, 5, -1966050, 131072, 5, -1310690, 720896, 4, -1245154, 720896, 5, -589794, 131072, 5, -524258, 131072, 5, -458722, 131072, 5, -393186, 131072, 5, -327650, 131072, 5, -262114, 131072, 5, -196578, 131072, 5, -131042, 131072, 5, -65506, 196608, 5, 196638, 196608, 5, 262174, 196608, 5, 327710, 196608, 5, 393246, 196608, 5, 458782, 196608, 5, 524318, 196608, 5, 917534, 196608, 5, 983070, 196608, 5, 1048606, 196608, 5, 1114142, 131072, 5, -1966049, 131072, 5, -1310689, 786432, 4, -1245153, 786432, 5, -589793, 131072, 5, -524257, 131072, 5, -458721, 131072, 5, -393185, 131072, 5, -327649, 131072, 5, -262113, 131072, 5, -196577, 131072, 5, -131041, 131072, 5, -65505, 196608, 5, 393247, 196608, 5, 917535, 196608, 5, 983071, 196608, 5, 1048607, 196608, 5, 1114143, 131072, 5, -1966048, 131072, 5, -1703904, 589824, 4, -1638368, 589824, 5, -1310688, 851968, 4, -1245152, 851968, 5, -917472, 589824, 4, -851936, 589824, 5, -589792, 131072, 5, -524256, 131072, 5, -458720, 131072, 5, -393184, 131072, 5, -327648, 131072, 5, -262112, 131072, 5, -196576, 131072, 5, -131040, 131072, 5, -65504, 131072, 5, 393248, 196608, 5, 786464, 196608, 5, 852000, 196608, 5, 917536, 196608, 5, 983072, 196608, 5, 1048608, 196608, 5, 1114144, 131072, 5, -1966047, 131072, 5, -1703903, 655360, 4, -1638367, 655360, 5, -1310687, 917504, 4, -1245151, 917504, 5, -1048543, 131072, 5, -983007, 131072, 5, -917471, 131072, 5, -851935, 131072, 5, -524255, 917504, 3, -65503, 196608, 5, 33, 196608, 5, 65569, 196608, 5, 393249, 196608, 5, 786465, 196608, 5, 852001, 196608, 5, 917537, 196608, 5, 983073, 196608, 5, 1048609, 196608, 5, 1114145, 131072, 5, -1966046, 131072, 5, -1703902, 720896, 4, -1638366, 720896, 5, -1310686, 983040, 4, -1245150, 983040, 5, -1048542, 131072, 5, -983006, 131072, 5, -917470, 131072, 5, -851934, 131072, 5, -786398, 131072, 5, -524254, 983040, 3, 65570, 196608, 5, 786466, 196608, 5, 852002, 196608, 5, 917538, 196608, 5, 983074, 196608, 5, 1048610, 196608, 5, 1114146, 131072, 5, -1966045, 131072, 5, -1703901, 786432, 4, -1638365, 786432, 5, -1114077, 131072, 5, -1048541, 131072, 5, -983005, 131072, 5, -917469, 131072, 5, -851933, 131072, 5, -786397, 131072, 5, 65571, 196608, 5, 786467, 196608, 5, 852003, 196608, 5, 917539, 196608, 5, 983075, 196608, 5, 1048611, 196608, 5, 1114147, 131072, 5, -1966044, 131072, 5, -1703900, 851968, 4, -1638364, 851968, 5, -1179612, 131072, 5, -1114076, 131072, 5, -1048540, 131072, 5, -983004, 131072, 5, -917468, 131072, 5, -851932, 131072, 5, -786396, 131072, 5, -720860, 131072, 5, 327716, 196608, 5, 393252, 196608, 5, 458788, 196608, 5, 524324, 196608, 5, 589860, 196608, 5, 655396, 196608, 5, 720932, 196608, 5, 786468, 196608, 5, 852004, 196608, 5, 917540, 196608, 5, 983076, 196608, 5, 1048612, 196608, 5, 1114148, 131072, 5, -1966043, 131072, 5, -1703899, 917504, 4, -1638363, 917504, 5, -1179611, 131072, 5, -1114075, 131072, 5, -1048539, 131072, 5, -983003, 131072, 5, -917467, 131072, 5, -851931, 131072, 5, -786395, 131072, 5, -720859, 131072, 5, -131035, 196608, 5, 327717, 196608, 5, 393253, 196608, 5, 458789, 196608, 5, 524325, 196608, 5, 589861, 196608, 5, 655397, 196608, 5, 720933, 196608, 5, 786469, 196608, 5, 852005, 196608, 5, 917541, 196608, 5, 983077, 196608, 5, 1048613, 196608, 5, 1114149, 131072, 5, -1966042, 131072, 5, -1703898, 983040, 4, -1638362, 983040, 5, -1179610, 131072, 5, -1114074, 131072, 5, -1048538, 131072, 5, -983002, 131072, 5, -917466, 131072, 5, -851930, 131072, 5, -786394, 131072, 5, -720858, 131072, 5, -655322, 131072, 5, -131034, 196608, 5, 327718, 196608, 5, 393254, 196608, 5, 458790, 196608, 5, 524326, 196608, 5, 589862, 196608, 5, 655398, 196608, 5, 720934, 196608, 5, 786470, 196608, 5, 852006, 196608, 5, 917542, 196608, 5, 983078, 196608, 5, 1048614, 196608, 5, 1114150, 131072, 5, -1966041, 131072, 5, -1900505, 131072, 5, -1834969, 131072, 5, -1769433, 131072, 5, -1703897, 131072, 5, -1638361, 131072, 5, -1572825, 131072, 5, -1507289, 131072, 5, -1441753, 131072, 5, -1376217, 131072, 5, -1310681, 131072, 5, -1245145, 131072, 5, -1179609, 131072, 5, -1114073, 131072, 5, -1048537, 131072, 5, -983001, 131072, 5, -917465, 131072, 5, -851929, 131072, 5, -786393, 131072, 5, -720857, 131072, 5, -655321, 131072, 5, -589785, 131072, 5, -524249, 131072, 5, -458713, 131072, 5, -393177, 131072, 5, -327641, 131072, 5, -262105, 131072, 5, -196569, 131072, 5, -131033, 131072, 5, -65497, 131072, 5, 39, 131072, 5, 65575, 131072, 5, 131111, 131072, 5, 196647, 131072, 5, 262183, 131072, 5, 327719, 131072, 5, 393255, 131072, 5, 458791, 131072, 5, 524327, 131072, 5, 589863, 131072, 5, 655399, 131072, 5, 720935, 131072, 5, 786471, 131072, 5, 852007, 131072, 5, 917543, 131072, 5, 983079, 131072, 5, 1048615, 131072, 5, 1114151, 131072, 5, 524308, 262144, 5, 917517, 196608, 5, -65526, 196608, 5, -131061, 196608, 5, -196596, 196608, 5, -196595, 196608, 5, -589811, 196608, 5, -524275, 196608, 5, -458739, 196608, 5, -393203, 196608, 5, -327667, 196608, 5, -262131, 196608, 5, 589844, 262144, 5, 655380, 262144, 5, 917516, 196608, 5, 851979, 196608, 5) diff --git a/princesse.gd b/princesse.gd new file mode 100644 index 0000000..7834830 --- /dev/null +++ b/princesse.gd @@ -0,0 +1,76 @@ +extends CharacterBody2D + +const WALK_SPEED = 200.0 +const ACCELERATION_SPEED = WALK_SPEED * 6.0 +const JUMP_VELOCITY = -400.0 +## Maximum speed at which the player can fall. +const TERMINAL_VELOCITY = 400 + +## The player listens for input actions appended with this suffix.[br] +## Used to separate controls for multiple players in splitscreen. +@export var action_suffix := "" + +var gravity: int = ProjectSettings.get("physics/2d/default_gravity") +@onready var platform_detector := $PlatformDetector as RayCast2D +@onready var animation := $AnimatedSprite2D as AnimatedSprite2D +@onready var animation_player := $AnimationPlayer as AnimationPlayer +@onready var camera := $Camera2D as Camera2D +var _double_jump_charged := false + + +func _physics_process(delta: float) -> void: + if is_on_floor(): + _double_jump_charged = true + if Input.is_action_just_pressed("jump" + action_suffix): + try_jump() + elif Input.is_action_just_released("jump" + action_suffix) and velocity.y < 0.0: + # The player let go of jump early, reduce vertical momentum. + velocity.y *= 0.6 + # Fall. + velocity.y = minf(TERMINAL_VELOCITY, velocity.y + gravity * delta) + + var direction := Input.get_axis("move_left" + action_suffix, "move_right" + action_suffix) * WALK_SPEED + velocity.x = move_toward(velocity.x, direction, ACCELERATION_SPEED * delta) + + if not is_zero_approx(velocity.x): + if velocity.x > 0.0: + animation.scale.x = 1.0 + else: + animation.scale.x = -1.0 + + floor_stop_on_slope = not platform_detector.is_colliding() + move_and_slide() # Character is colliding + + var anim := get_new_animation(false) + if anim != animation.animation: + animation.animation = anim + animation.play() + + + + +func get_new_animation(is_shooting := false) -> String: + var animation_new: String + if is_on_floor(): + if absf(velocity.x) > 0.1: + animation_new = "walk" + else: + animation_new = "idle" + else: + if velocity.y > 0.0: + animation_new = "falling_straight" + else: + animation_new = "jumping" + return animation_new + + +func try_jump() -> void: + if is_on_floor(): + pass + elif _double_jump_charged: + _double_jump_charged = false + velocity.x *= 2.5 + else: + return + velocity.y = JUMP_VELOCITY + diff --git a/princesse.tscn b/princesse.tscn index 68e3e59..71b7067 100644 --- a/princesse.tscn +++ b/princesse.tscn @@ -1,3 +1,217 @@ -[gd_scene format=3 uid="uid://dv0mokf4eogm7"] +[gd_scene load_steps=31 format=3 uid="uid://dv0mokf4eogm7"] -[node name="Princesse" type="Area2D"] +[ext_resource type="Script" path="res://princesse.gd" id="1_dkp7s"] +[ext_resource type="Texture2D" uid="uid://dr7fyh2rufsyj" path="res://sprite/princess_falling_direction.png" id="2_hholp"] +[ext_resource type="Texture2D" uid="uid://cc2vjgg2dw27g" path="res://sprite/princess_falling.png" id="3_kbaya"] +[ext_resource type="Texture2D" uid="uid://bwod37xemy88x" path="res://sprite/princess.png" id="4_iiu2b"] +[ext_resource type="Texture2D" uid="uid://b1624w7katr05" path="res://sprite/princess_jumping_impulsion.png" id="5_njcte"] +[ext_resource type="Texture2D" uid="uid://c2xtcu5ysgi7o" path="res://sprite/princess_jumping.png" id="6_srvje"] +[ext_resource type="Texture2D" uid="uid://d23lmsjrjw1mk" path="res://sprite/princess_wall_stick.png" id="7_8dix4"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_i248f"] +atlas = ExtResource("2_hholp") +region = Rect2(0, 0, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_e23c2"] +atlas = ExtResource("2_hholp") +region = Rect2(0, 50, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fyqwp"] +atlas = ExtResource("3_kbaya") +region = Rect2(0, 0, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mxdjd"] +atlas = ExtResource("3_kbaya") +region = Rect2(0, 50, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yxjwj"] +atlas = ExtResource("4_iiu2b") +region = Rect2(0, 0, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yqpcg"] +atlas = ExtResource("5_njcte") +region = Rect2(0, 0, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8yyph"] +atlas = ExtResource("5_njcte") +region = Rect2(0, 50, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ftqux"] +atlas = ExtResource("5_njcte") +region = Rect2(0, 100, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_du0hw"] +atlas = ExtResource("6_srvje") +region = Rect2(0, 0, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gu3eg"] +atlas = ExtResource("6_srvje") +region = Rect2(0, 50, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0nfn2"] +atlas = ExtResource("4_iiu2b") +region = Rect2(0, 50, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wo2be"] +atlas = ExtResource("4_iiu2b") +region = Rect2(0, 100, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4j10n"] +atlas = ExtResource("4_iiu2b") +region = Rect2(0, 150, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kwlld"] +atlas = ExtResource("4_iiu2b") +region = Rect2(0, 200, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_57mjl"] +atlas = ExtResource("4_iiu2b") +region = Rect2(0, 250, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_34pfo"] +atlas = ExtResource("7_8dix4") +region = Rect2(0, 0, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xck10"] +atlas = ExtResource("7_8dix4") +region = Rect2(0, 50, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1qhca"] +atlas = ExtResource("7_8dix4") +region = Rect2(0, 100, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bljfu"] +atlas = ExtResource("7_8dix4") +region = Rect2(0, 150, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fvex7"] +atlas = ExtResource("7_8dix4") +region = Rect2(0, 200, 24, 50) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qw8g6"] +atlas = ExtResource("7_8dix4") +region = Rect2(0, 250, 24, 50) + +[sub_resource type="SpriteFrames" id="SpriteFrames_q52wx"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_i248f") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_e23c2") +}], +"loop": true, +"name": &"falling_diagonals", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_fyqwp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mxdjd") +}], +"loop": true, +"name": &"falling_straight", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_yxjwj") +}], +"loop": true, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_yqpcg") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8yyph") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ftqux") +}], +"loop": true, +"name": &"jump_impulsion", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_du0hw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gu3eg") +}], +"loop": true, +"name": &"jumping", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_yxjwj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0nfn2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_wo2be") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4j10n") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kwlld") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_57mjl") +}], +"loop": true, +"name": &"walk", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_34pfo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xck10") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1qhca") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bljfu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fvex7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qw8g6") +}], +"loop": true, +"name": &"wall_stick", +"speed": 5.0 +}] + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_6r7th"] +height = 52.0 + +[node name="Princesse" type="CharacterBody2D"] +script = ExtResource("1_dkp7s") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_q52wx") +animation = &"idle" + +[node name="PlatformDetector" type="RayCast2D" parent="."] +collision_mask = 8 + +[node name="Camera2D" type="Camera2D" parent="."] +zoom = Vector2(2, 2) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(2, 0) +shape = SubResource("CapsuleShape2D_6r7th") diff --git a/project.godot b/project.godot index db51411..79cc57f 100644 --- a/project.godot +++ b/project.godot @@ -10,11 +10,38 @@ config_version=5 [application] -config/name="Nouveau Projet De Jeu" +config/name="Princesse Lactose" +run/main_scene="res://level.tscn" config/features=PackedStringArray("4.0", "GL Compatibility") config/icon="res://icon.svg" +[input] + +move_right={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":0,"key_label":4194321,"unicode":0,"echo":false,"script":null) +] +} +move_left={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":0,"key_label":4194319,"unicode":0,"echo":false,"script":null) +] +} +crouch={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":0,"key_label":4194322,"unicode":0,"echo":false,"script":null) +] +} +jump={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":0,"key_label":32,"unicode":32,"echo":false,"script":null) +] +} + +[layer_names] + +2d_render/layer_1="plateformes" + [rendering] -renderer/rendering_method="gl_compatibility" renderer/rendering_method.mobile="gl_compatibility"