diff --git a/enemies/ghost.gd b/enemies/ghost.gd index d64f6ca..bb3cfde 100644 --- a/enemies/ghost.gd +++ b/enemies/ghost.gd @@ -35,4 +35,4 @@ func _on_death(): self.queue_free() func _on_damage_taken(_damage : int, dir: Vector2): - current_knockback = dir * knockback_weight + current_knockback = - dir * knockback_weight diff --git a/items/arrow.gd b/items/arrow.gd index 388e66a..9889a16 100644 --- a/items/arrow.gd +++ b/items/arrow.gd @@ -7,4 +7,4 @@ var direction = Vector2(1,0) func _physics_process(delta: float) -> void: self.position += delta * speed * direction for area in get_overlapping_areas(): - area.hurt(damage, direction) + area.hurt(damage, -3 * direction) diff --git a/items/bow.tscn b/items/bow.tscn index 76a26e3..c86f03f 100644 --- a/items/bow.tscn +++ b/items/bow.tscn @@ -17,6 +17,6 @@ scale = Vector2(3.1, 3.1) shape = SubResource("CircleShape2D_gllxn") [node name="Sprite2D" type="Sprite2D" parent="."] -modulate = Color(1, 0, 1, 1) +modulate = Color(0, 1, 0, 1) scale = Vector2(0.45, 0.45) texture = ExtResource("2_gllxn") diff --git a/items/item_spawn.tscn b/items/item_spawn.tscn index 3956358..5753c45 100644 --- a/items/item_spawn.tscn +++ b/items/item_spawn.tscn @@ -1,14 +1,17 @@ -[gd_scene load_steps=4 format=3 uid="uid://xj0of571aur1"] +[gd_scene load_steps=7 format=3 uid="uid://xj0of571aur1"] [ext_resource type="Script" uid="uid://b8em61mqgdi58" path="res://items/item_spawn.gd" id="1_ms6tn"] [ext_resource type="PackedScene" uid="uid://b00185vygcka1" path="res://items/heal_item.tscn" id="2_w6i8k"] [ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_5pwuf"] +[ext_resource type="PackedScene" uid="uid://gwctb2xqsbj" path="res://items/healthup.tscn" id="3_yi7ag"] +[ext_resource type="PackedScene" uid="uid://ddn025xnjngko" path="res://items/bow.tscn" id="4_v0ua0"] +[ext_resource type="PackedScene" uid="uid://ewe36lqcjojk" path="res://items/updash.tscn" id="5_uitgx"] [node name="ItemSpawn" type="Node2D"] script = ExtResource("1_ms6tn") -common_items = Array[PackedScene]([ExtResource("2_w6i8k")]) -rare_items = Array[PackedScene]([ExtResource("2_w6i8k")]) -unique_items = Array[PackedScene]([ExtResource("2_w6i8k")]) +common_items = Array[PackedScene]([ExtResource("2_w6i8k"), ExtResource("3_yi7ag"), ExtResource("5_uitgx"), ExtResource("4_v0ua0")]) +rare_items = Array[PackedScene]([ExtResource("4_v0ua0")]) +unique_items = Array[PackedScene]([ExtResource("5_uitgx")]) metadata/_custom_type_script = "uid://b8em61mqgdi58" [node name="EarthAligner" parent="." instance=ExtResource("3_5pwuf")] diff --git a/main.tscn b/main.tscn index 381ec63..d29f3e6 100644 --- a/main.tscn +++ b/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=3 uid="uid://cxo6bq26huau7"] +[gd_scene load_steps=8 format=3 uid="uid://cxo6bq26huau7"] [ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"] [ext_resource type="Script" uid="uid://vgxh2xdevat7" path="res://world/earth.gd" id="2_lquwl"] @@ -7,14 +7,17 @@ [ext_resource type="PackedScene" uid="uid://73g8y37skebh" path="res://item_ui/item_ui.tscn" id="6_4c57u"] [ext_resource type="PackedScene" uid="uid://cjsrtswk4vgf2" path="res://healthbar/healthbar.tscn" id="6_7mycd"] [ext_resource type="PackedScene" uid="uid://dpdn2php3ydsv" path="res://death_screen/death_screen.tscn" id="7_5vw27"] -[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="7_272bh"] -[ext_resource type="PackedScene" uid="uid://ddn025xnjngko" path="res://items/bow.tscn" id="9_4c57u"] -[ext_resource type="PackedScene" uid="uid://chu67ci7sl488" path="res://enemies/ghost.tscn" id="9_kek77"] -[ext_resource type="PackedScene" uid="uid://dfva4dhflxglr" path="res://items/arrow.tscn" id="10_4c57u"] -[ext_resource type="PackedScene" uid="uid://gwctb2xqsbj" path="res://items/healthup.tscn" id="11_efxa6"] [node name="main" type="Node2D"] +[node name="Layer0" type="Parallax2D" parent="."] + +[node name="Layer1" type="Parallax2D" parent="."] + +[node name="Layer2" type="Parallax2D" parent="."] + +[node name="Layer3" type="Parallax2D" parent="."] + [node name="Earth" parent="." instance=ExtResource("3_lquwl")] unique_name_in_owner = true script = ExtResource("2_lquwl") @@ -36,7 +39,7 @@ zoom = Vector2(0.12, 0.12) script = ExtResource("4_1bvp3") [node name="Timer" type="Timer" parent="Building Generator"] -wait_time = 5.0 +wait_time = 0.8 autostart = true [node name="CanvasLayer" type="CanvasLayer" parent="."] @@ -50,22 +53,6 @@ offset_bottom = 128.0 [node name="DeathScreen" parent="CanvasLayer" instance=ExtResource("7_5vw27")] visible = false -[node name="Platform" parent="." instance=ExtResource("7_272bh")] -position = Vector2(900, -3000) -scale = Vector2(5, 3.1) - -[node name="Ghost" parent="." instance=ExtResource("9_kek77")] -position = Vector2(0, -3000) - -[node name="Arrow" parent="." instance=ExtResource("10_4c57u")] -position = Vector2(0, -3150) - -[node name="HealthUp" parent="." instance=ExtResource("11_efxa6")] -position = Vector2(200, -3100) - -[node name="Bow" parent="." instance=ExtResource("9_4c57u")] -position = Vector2(0, -3100) - [connection signal="health_changed" from="Player" to="CanvasLayer/Healthbar" method="_on_player_health_changed"] [connection signal="max_hp_changed" from="Player" to="CanvasLayer/Healthbar" method="_on_player_max_hp_changed"] [connection signal="player_died" from="Player" to="CanvasLayer/DeathScreen" method="_on_player_player_died"] diff --git a/player/sword.gd b/player/sword.gd index 2053173..9540423 100644 --- a/player/sword.gd +++ b/player/sword.gd @@ -21,6 +21,6 @@ func _physics_process(delta: float) -> void: if(slash_timer == 0): anim_sprite.visible = false for area in get_overlapping_areas(): - area.hurt(damage, Vector2(-facing, 0)) + area.hurt(damage, -get_parent().earth_aligner.global_from_local(Vector2(-facing, 0))) diff --git a/traps/morning_star.gd b/traps/morning_star.gd index 6413568..d54d909 100644 --- a/traps/morning_star.gd +++ b/traps/morning_star.gd @@ -16,7 +16,7 @@ func _physics_process(delta: float) -> void: damage_target(target) func damage_target(target: CollisionObject2D): - var dir = -(ball.global_position - target.global_position).normalized() + var dir = (ball.global_position - target.global_position).normalized() if(target.get_collision_layer_value(3)): target.hurt(player_damage, dir) else: diff --git a/world/Background Prototype/Background Prototype Layer 1.png b/world/Background Prototype/Background Prototype Layer 1.png new file mode 100644 index 0000000..fb24a7e Binary files /dev/null and b/world/Background Prototype/Background Prototype Layer 1.png differ diff --git a/world/Background Prototype/Background Prototype Layer 1.png.import b/world/Background Prototype/Background Prototype Layer 1.png.import new file mode 100644 index 0000000..3291c4a --- /dev/null +++ b/world/Background Prototype/Background Prototype Layer 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bk0lxjv2qjxnp" +path="res://.godot/imported/Background Prototype Layer 1.png-47bb54b6d20a1ded35cb94112bf217ac.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://world/Background Prototype/Background Prototype Layer 1.png" +dest_files=["res://.godot/imported/Background Prototype Layer 1.png-47bb54b6d20a1ded35cb94112bf217ac.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/world/Background Prototype/Background Prototype Layer 2.png b/world/Background Prototype/Background Prototype Layer 2.png new file mode 100644 index 0000000..f2907c3 Binary files /dev/null and b/world/Background Prototype/Background Prototype Layer 2.png differ diff --git a/world/Background Prototype/Background Prototype Layer 2.png.import b/world/Background Prototype/Background Prototype Layer 2.png.import new file mode 100644 index 0000000..7415d89 --- /dev/null +++ b/world/Background Prototype/Background Prototype Layer 2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b6fkgig57ki5j" +path="res://.godot/imported/Background Prototype Layer 2.png-ab86220f0fff6116368732c43de3cd4a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://world/Background Prototype/Background Prototype Layer 2.png" +dest_files=["res://.godot/imported/Background Prototype Layer 2.png-ab86220f0fff6116368732c43de3cd4a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/world/Background Prototype/Background Prototype Layer 3.png b/world/Background Prototype/Background Prototype Layer 3.png new file mode 100644 index 0000000..066dc2f Binary files /dev/null and b/world/Background Prototype/Background Prototype Layer 3.png differ diff --git a/world/Background Prototype/Background Prototype Layer 3.png.import b/world/Background Prototype/Background Prototype Layer 3.png.import new file mode 100644 index 0000000..7399a52 --- /dev/null +++ b/world/Background Prototype/Background Prototype Layer 3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://tctuwr3rmof4" +path="res://.godot/imported/Background Prototype Layer 3.png-5a49ea16a5dc160131825028039c991b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://world/Background Prototype/Background Prototype Layer 3.png" +dest_files=["res://.godot/imported/Background Prototype Layer 3.png-5a49ea16a5dc160131825028039c991b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/world/Background Prototype/Background Prototype Layer 4.png b/world/Background Prototype/Background Prototype Layer 4.png new file mode 100644 index 0000000..3c0294c Binary files /dev/null and b/world/Background Prototype/Background Prototype Layer 4.png differ diff --git a/world/Background Prototype/Background Prototype Layer 4.png.import b/world/Background Prototype/Background Prototype Layer 4.png.import new file mode 100644 index 0000000..6ff53ad --- /dev/null +++ b/world/Background Prototype/Background Prototype Layer 4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b3d276mpm5mqr" +path="res://.godot/imported/Background Prototype Layer 4.png-ee5791549e6767ad5445aec25f3260a1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://world/Background Prototype/Background Prototype Layer 4.png" +dest_files=["res://.godot/imported/Background Prototype Layer 4.png-ee5791549e6767ad5445aec25f3260a1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/world/Background prototype.png b/world/Background prototype.png new file mode 100644 index 0000000..0292334 Binary files /dev/null and b/world/Background prototype.png differ diff --git a/world/Background prototype.png.import b/world/Background prototype.png.import new file mode 100644 index 0000000..c64e0d8 --- /dev/null +++ b/world/Background prototype.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d3fpq76anm4t7" +path="res://.godot/imported/Background prototype.png-82410769bb8789c49aff3e49453fc3fe.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://world/Background prototype.png" +dest_files=["res://.godot/imported/Background prototype.png-82410769bb8789c49aff3e49453fc3fe.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1