diff --git a/src/Menus/DragNDrop/DragNDropUI.tscn b/src/Menus/DragNDrop/DragNDropUI.tscn index 63c4b5f..884236c 100644 --- a/src/Menus/DragNDrop/DragNDropUI.tscn +++ b/src/Menus/DragNDrop/DragNDropUI.tscn @@ -2,7 +2,7 @@ [ext_resource path="res://Objects/Traps/Spike/SpikeCard.tscn" type="PackedScene" id=1] [ext_resource path="res://Menus/DragNDrop/DragSink.tscn" type="PackedScene" id=2] -[ext_resource path="res://Objects/Banana/BananaCard.tscn" type="PackedScene" id=3] +[ext_resource path="res://Objects/Traps/Flame/FlameCard.tscn" type="PackedScene" id=3] [ext_resource path="res://Objects/Traps/Bear/BearCard.tscn" type="PackedScene" id=4] [ext_resource path="res://Objects/Barriere/BarrierCard.tscn" type="PackedScene" id=5] [ext_resource path="res://Objects/Barrel/BarrelCard.tscn" type="PackedScene" id=6] @@ -18,8 +18,6 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="GenericCard1" parent="." instance=ExtResource( 3 )] - [node name="GenericCard2" parent="." instance=ExtResource( 4 )] [node name="GenericCard3" parent="." instance=ExtResource( 5 )] @@ -38,3 +36,9 @@ margin_left = 236.922 margin_top = 221.453 margin_right = 268.922 margin_bottom = 253.453 + +[node name="FlameCard" parent="." instance=ExtResource( 3 )] +margin_left = 12.6684 +margin_top = 221.458 +margin_right = 44.6684 +margin_bottom = 253.458 diff --git a/src/Objects/Traps/Bear/Bear.tscn b/src/Objects/Traps/Bear/Bear.tscn index 5c6530d..362383d 100644 --- a/src/Objects/Traps/Bear/Bear.tscn +++ b/src/Objects/Traps/Bear/Bear.tscn @@ -80,6 +80,7 @@ shape = SubResource( 2 ) [node name="Hurtbox" parent="." instance=ExtResource( 35 )] collision_layer = 32 collision_mask = 0 +slowdown_value = 300 [node name="CollisionShape2D" parent="Hurtbox" index="0"] rotation = 1.5708 diff --git a/src/Objects/Traps/Flame/Flame.gd b/src/Objects/Traps/Flame/Flame.gd index 1fdc4c5..7b3fc4b 100644 --- a/src/Objects/Traps/Flame/Flame.gd +++ b/src/Objects/Traps/Flame/Flame.gd @@ -1,5 +1,24 @@ extends Node2D +export(float,0.1,10.0) var burning_time = 2.0 +var timer = Timer.new() + + +func on_timer_timeout(): + timer.stop() + queue_free() func _ready(): $Sprite.play("burn") + add_child(timer) + timer.connect("timeout", self, "on_timer_timeout") + timer.set_wait_time(burning_time) + timer.start() + + + + +func _on_Hitbox_body_entered(body): + if(body.get_name() == "Player"): + body.velocity*=-3 + diff --git a/src/Objects/Traps/Flame/Flame.tscn b/src/Objects/Traps/Flame/Flame.tscn index b2f23fa..8ff65f1 100644 --- a/src/Objects/Traps/Flame/Flame.tscn +++ b/src/Objects/Traps/Flame/Flame.tscn @@ -93,5 +93,6 @@ collision_layer = 16 [node name="CollisionShape2D" parent="Hitbox" index="0"] position = Vector2( -0.157784, -0.157772 ) shape = SubResource( 2 ) +[connection signal="body_entered" from="Hitbox" to="." method="_on_Hitbox_body_entered"] [editable path="Hitbox"] diff --git a/src/Objects/Traps/Sting/Sting.tscn b/src/Objects/Traps/Sting (UNUSED)/Sting.tscn similarity index 100% rename from src/Objects/Traps/Sting/Sting.tscn rename to src/Objects/Traps/Sting (UNUSED)/Sting.tscn diff --git a/src/Objects/Traps/Sting/StingCard.tscn b/src/Objects/Traps/Sting (UNUSED)/StingCard.tscn similarity index 93% rename from src/Objects/Traps/Sting/StingCard.tscn rename to src/Objects/Traps/Sting (UNUSED)/StingCard.tscn index e3f69b5..8185dd3 100644 --- a/src/Objects/Traps/Sting/StingCard.tscn +++ b/src/Objects/Traps/Sting (UNUSED)/StingCard.tscn @@ -6,7 +6,8 @@ [ext_resource path="res://Objects/Card/level0.png" type="Texture" id=4] [ext_resource path="res://Objects/Card/level2.png" type="Texture" id=5] [ext_resource path="res://Objects/Card/level1.png" type="Texture" id=6] -[ext_resource path="res://Objects/Traps/Sting/Sting.tscn" type="PackedScene" id=7] +[ext_resource path="res://Objects/Traps/Sting (UNUSED)/Sting.tscn" type="PackedScene" id=7] + [sub_resource type="SpriteFrames" id=1] animations = [ { diff --git a/src/World.tscn b/src/World.tscn index bffec95..3325d9c 100644 --- a/src/World.tscn +++ b/src/World.tscn @@ -21,26 +21,19 @@ __meta__ = { WinRounds = 5 HeroTemplate = ExtResource( 1 ) -[node name="WallSprite" type="Sprite" parent="."] -pause_mode = 1 -position = Vector2( 360, 176 ) -region_enabled = true -region_rect = Rect2( 0, 0, 1280, 720 ) - [node name="Background" parent="." instance=ExtResource( 7 )] pause_mode = 1 -frame = 47 +frame = 8 [node name="FloorTileMap" type="TileMap" parent="."] pause_mode = 1 -visible = false position = Vector2( 16, 16 ) tile_set = ExtResource( 3 ) cell_size = Vector2( 32, 32 ) collision_layer = 2 collision_mask = 0 format = 1 -tile_data = PoolIntArray( -131074, 47, 0, -131073, 47, 1, -196608, 47, 1, -196607, 47, 1, -196606, 47, 1, -196605, 47, 1, -196604, 47, 1, -196603, 47, 1, -196602, 47, 1, -196601, 47, 1, -196600, 47, 1, -196599, 47, 1, -196598, 47, 1, -196597, 47, 1, -196596, 47, 1, -196595, 47, 1, -196594, 47, 1, -196593, 47, 1, -196592, 47, 2, -65538, 47, 65536, -65537, 47, 65537, -131072, 47, 65537, -131071, 47, 65537, -131070, 47, 65537, -131069, 47, 65537, -131068, 47, 65537, -131067, 47, 65537, -131066, 47, 65537, -131065, 47, 65537, -131064, 47, 65537, -131063, 47, 65537, -131062, 47, 65537, -131061, 47, 65537, -131060, 47, 65537, -131059, 47, 65537, -131058, 47, 65537, -131057, 47, 65537, -131056, 47, 65538, -2, 47, 65536, -1, 47, 65541, -65536, 47, 131073, -65535, 47, 131073, -65534, 47, 131073, -65533, 47, 131073, -65532, 47, 131073, -65531, 47, 131073, -65530, 47, 131073, -65529, 47, 65544, -65528, 47, 131073, -65527, 47, 131073, -65526, 47, 131073, -65525, 47, 65542, -65524, 47, 65541, -65523, 47, 131073, -65522, 47, 65542, -65521, 47, 65537, -65520, 47, 65538, 65534, 47, 65536, 65535, 47, 65538, 7, 47, 65539, 11, 47, 131072, 12, 47, 65543, 14, 47, 65536, 15, 47, 65537, 16, 47, 65538, 131070, 47, 65536, 131071, 47, 65538, 65543, 47, 65539, 65548, 47, 65539, 65550, 47, 65536, 65551, 47, 65537, 65552, 47, 65538, 196606, 47, 65536, 196607, 47, 65538, 131079, 47, 196612, 131080, 47, 196609, 131081, 47, 196610, 131084, 47, 131075, 131086, 47, 65536, 131087, 47, 65537, 131088, 47, 65538, 262142, 47, 65536, 262143, 47, 65538, 196622, 47, 65536, 196623, 47, 65537, 196624, 47, 65538, 327678, 47, 65536, 327679, 47, 65538, 262153, 47, 196608, 262154, 47, 7, 262156, 47, 3, 262158, 47, 65536, 262159, 47, 65537, 262160, 47, 65538, 393214, 47, 65536, 393215, 47, 65538, 327690, 47, 131076, 327691, 47, 1, 327692, 47, 131079, 327694, 47, 65536, 327695, 47, 65537, 327696, 47, 65538, 458750, 47, 65536, 458751, 47, 131077, 393216, 47, 1, 393217, 47, 1, 393218, 47, 1, 393219, 47, 1, 393220, 47, 1, 393221, 47, 1, 393222, 47, 1, 393223, 47, 1, 393224, 47, 1, 393225, 47, 1, 393226, 47, 131078, 393227, 47, 65537, 393228, 47, 131077, 393229, 47, 1, 393230, 47, 131078, 393231, 47, 65537, 393232, 47, 65538, 524286, 47, 65536, 524287, 47, 65537, 458752, 47, 65537, 458753, 47, 65537, 458754, 47, 65537, 458755, 47, 65537, 458756, 47, 65537, 458757, 47, 65537, 458758, 47, 65537, 458759, 47, 65537, 458760, 47, 65537, 458761, 47, 65537, 458762, 47, 65537, 458763, 47, 65537, 458764, 47, 65537, 458765, 47, 65537, 458766, 47, 65537, 458767, 47, 65537, 458768, 47, 65538, 589822, 47, 65536, 589823, 47, 65537, 524288, 47, 65537, 524289, 47, 65537, 524290, 47, 65537, 524291, 47, 65537, 524292, 47, 65537, 524293, 47, 65537, 524294, 47, 65537, 524295, 47, 65537, 524296, 47, 65537, 524297, 47, 65537, 524298, 47, 65537, 524299, 47, 65537, 524300, 47, 65537, 524301, 47, 65537, 524302, 47, 65537, 524303, 47, 65537, 524304, 47, 65538, 655358, 47, 131072, 655359, 47, 131073, 589824, 47, 131073, 589825, 47, 131073, 589826, 47, 131073, 589827, 47, 131073, 589828, 47, 131073, 589829, 47, 131073, 589830, 47, 131073, 589831, 47, 131073, 589832, 47, 131073, 589833, 47, 131073, 589834, 47, 131073, 589835, 47, 131073, 589836, 47, 131073, 589837, 47, 131073, 589838, 47, 131073, 589839, 47, 131073, 589840, 47, 131074 ) +tile_data = PoolIntArray( -131074, 47, 0, -131073, 47, 1, -196608, 47, 1, -196607, 47, 1, -196606, 47, 1, -196605, 47, 1, -196604, 47, 1, -196603, 47, 1, -196602, 47, 1, -196601, 47, 1, -196600, 47, 1, -196599, 47, 1, -196598, 47, 1, -196597, 47, 1, -196596, 47, 1, -196595, 47, 1, -196594, 47, 1, -196593, 47, 1, -196592, 47, 2, -65538, 47, 65536, -65537, 47, 65537, -131072, 47, 65537, -131071, 47, 65537, -131070, 47, 65537, -131069, 47, 65537, -131068, 47, 65537, -131067, 47, 65537, -131066, 47, 65537, -131065, 47, 65537, -131064, 47, 65537, -131063, 47, 65537, -131062, 47, 65537, -131061, 47, 65537, -131060, 47, 65537, -131059, 47, 65537, -131058, 47, 65537, -131057, 47, 65537, -131056, 47, 65538, -2, 47, 65536, -1, 47, 65541, -65536, 47, 131073, -65535, 47, 131073, -65534, 47, 131073, -65533, 47, 131073, -65532, 47, 131073, -65531, 47, 131073, -65530, 47, 131073, -65529, 47, 131073, -65528, 47, 131073, -65527, 47, 131073, -65526, 47, 131073, -65525, 47, 131073, -65524, 47, 131073, -65523, 47, 131073, -65522, 47, 65542, -65521, 47, 65537, -65520, 47, 65538, 65534, 47, 65536, 65535, 47, 65538, 14, 47, 65536, 15, 47, 65537, 16, 47, 65538, 131070, 47, 65536, 131071, 47, 65538, 65550, 47, 65536, 65551, 47, 65537, 65552, 47, 65538, 196606, 47, 65536, 196607, 47, 65538, 131086, 47, 65536, 131087, 47, 65537, 131088, 47, 65538, 262142, 47, 65536, 262143, 47, 65538, 196622, 47, 65536, 196623, 47, 65537, 196624, 47, 65538, 327678, 47, 65536, 327679, 47, 65538, 262158, 47, 65536, 262159, 47, 65537, 262160, 47, 65538, 393214, 47, 65536, 393215, 47, 65538, 327694, 47, 65536, 327695, 47, 65537, 327696, 47, 65538, 458750, 47, 65536, 458751, 47, 131077, 393216, 47, 1, 393217, 47, 1, 393218, 47, 1, 393219, 47, 1, 393220, 47, 1, 393221, 47, 1, 393222, 47, 1, 393223, 47, 1, 393224, 47, 1, 393225, 47, 1, 393226, 47, 1, 393227, 47, 1, 393228, 47, 1, 393229, 47, 1, 393230, 47, 131078, 393231, 47, 65537, 393232, 47, 65538, 524286, 47, 65536, 524287, 47, 65537, 458752, 47, 65537, 458753, 47, 65537, 458754, 47, 65537, 458755, 47, 65537, 458756, 47, 65537, 458757, 47, 65537, 458758, 47, 65537, 458759, 47, 65537, 458760, 47, 65537, 458761, 47, 65537, 458762, 47, 65537, 458763, 47, 65537, 458764, 47, 65537, 458765, 47, 65537, 458766, 47, 65537, 458767, 47, 65537, 458768, 47, 65538, 589822, 47, 65536, 589823, 47, 65537, 524288, 47, 65537, 524289, 47, 65537, 524290, 47, 65537, 524291, 47, 65537, 524292, 47, 65537, 524293, 47, 65537, 524294, 47, 65537, 524295, 47, 65537, 524296, 47, 65537, 524297, 47, 65537, 524298, 47, 65537, 524299, 47, 65537, 524300, 47, 65537, 524301, 47, 65537, 524302, 47, 65537, 524303, 47, 65537, 524304, 47, 65538, 655358, 47, 131072, 655359, 47, 131073, 589824, 47, 131073, 589825, 47, 131073, 589826, 47, 131073, 589827, 47, 131073, 589828, 47, 131073, 589829, 47, 131073, 589830, 47, 131073, 589831, 47, 131073, 589832, 47, 131073, 589833, 47, 131073, 589834, 47, 131073, 589835, 47, 131073, 589836, 47, 131073, 589837, 47, 131073, 589838, 47, 131073, 589839, 47, 131073, 589840, 47, 131074 ) [node name="YSort" type="YSort" parent="."] pause_mode = 1 @@ -63,6 +56,10 @@ visible = false [node name="DragNDropUI" parent="CanvasLayer" instance=ExtResource( 5 )] anchor_top = -0.00171594 anchor_bottom = 0.998284 +margin_left = 0.0 +margin_top = 0.463304 +margin_right = 0.0 +margin_bottom = 0.463318 [node name="SelectUpgradeUI" parent="CanvasLayer" instance=ExtResource( 9 )] visible = false