diff --git a/enemies/boss/Untitled 15.png b/enemies/boss/Untitled 15.png new file mode 100644 index 0000000..eee0d7c Binary files /dev/null and b/enemies/boss/Untitled 15.png differ diff --git a/enemies/boss/Untitled 15.png.import b/enemies/boss/Untitled 15.png.import new file mode 100644 index 0000000..44aa618 --- /dev/null +++ b/enemies/boss/Untitled 15.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://caqimfmdp7jsd" +path="res://.godot/imported/Untitled 15.png-9f7aef1d51ca656d39c301d3244f358e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://enemies/boss/Untitled 15.png" +dest_files=["res://.godot/imported/Untitled 15.png-9f7aef1d51ca656d39c301d3244f358e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/enemies/boss/boss.gd b/enemies/boss/boss.gd index 6a8350a..25b0c27 100644 --- a/enemies/boss/boss.gd +++ b/enemies/boss/boss.gd @@ -24,6 +24,12 @@ func choose_next_move() -> String: if $EnemyHurtbox.hp < $EnemyHurtbox.max_hp / 3 and risen == 1: risen += 1 return "water_rise" + + var pool = ["splash"] + if not (position.length() - %Water.radius < 300 and randf()<0.75): + pool.append("slam") + if not (player.position.length() > %Water.radius + 900 and randf()<0.75): + pool.append("wave") return ["slam", "wave", "splash"].pick_random() func _physics_process(delta: float) -> void: diff --git a/enemies/boss/boss.tscn b/enemies/boss/boss.tscn index 5a3e842..c2ba608 100644 --- a/enemies/boss/boss.tscn +++ b/enemies/boss/boss.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=9 format=3 uid="uid://cpe4s6vsn0ujd"] -[ext_resource type="Texture2D" uid="uid://d3b5hmhjw2jyc" path="res://enemies/ghost/ghost animation/Ghost 1.png" id="1_6xxrv"] [ext_resource type="Script" uid="uid://uv672p8f4n6k" path="res://enemies/boss/boss.gd" id="1_skx2t"] [ext_resource type="PackedScene" uid="uid://bg2hgia0jqnqf" path="res://enemies/boss/blob_big.tscn" id="2_o1i15"] [ext_resource type="PackedScene" uid="uid://mtfsdd4cdf3a" path="res://utils/enemy_hurtbox.tscn" id="2_skx2t"] +[ext_resource type="Texture2D" uid="uid://q5mu3lxlsd6f" path="res://enemies/boss/boss2.png" id="3_opohk"] [ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="4_lnbgr"] [ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="6_opohk"] @@ -13,6 +13,7 @@ size = Vector2(300, 250) [node name="Boss" type="CharacterBody2D"] +scale = Vector2(1.8, 1.8) collision_mask = 32 script = ExtResource("1_skx2t") big_blob = ExtResource("2_o1i15") @@ -23,8 +24,8 @@ scale = Vector2(10, 10) shape = SubResource("CapsuleShape2D_lnbgr") [node name="Sprite2D" type="Sprite2D" parent="."] -scale = Vector2(3.85156, 1.9375) -texture = ExtResource("1_6xxrv") +scale = Vector2(1.5, 1.5) +texture = ExtResource("3_opohk") [node name="EnemyHurtbox" parent="." node_paths=PackedStringArray("canvasItem") instance=ExtResource("2_skx2t")] collision_layer = 16 @@ -37,12 +38,6 @@ rotation = 1.5708 scale = Vector2(11, 11) shape = SubResource("CapsuleShape2D_lnbgr") -[node name="CollisionShape2D2" type="CollisionShape2D" parent="EnemyHurtbox"] -position = Vector2(0, 6) -rotation = 1.5708 -scale = Vector2(5, 14) -shape = SubResource("CapsuleShape2D_lnbgr") - [node name="EarthAligner" parent="." instance=ExtResource("4_lnbgr")] [node name="Hitbox" type="Area2D" parent="."] diff --git a/enemies/boss/boss2.png b/enemies/boss/boss2.png new file mode 100644 index 0000000..88347d4 Binary files /dev/null and b/enemies/boss/boss2.png differ diff --git a/enemies/boss/boss2.png.import b/enemies/boss/boss2.png.import new file mode 100644 index 0000000..2b2ec20 --- /dev/null +++ b/enemies/boss/boss2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://q5mu3lxlsd6f" +path="res://.godot/imported/boss2.png-35ba66553dce9db015aee038fd8ec691.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://enemies/boss/boss2.png" +dest_files=["res://.godot/imported/boss2.png-35ba66553dce9db015aee038fd8ec691.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/main.tscn b/main.tscn index d2ac440..26ea362 100644 --- a/main.tscn +++ b/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=3 uid="uid://bjuak0sbjpamb"] +[gd_scene load_steps=13 format=3 uid="uid://cxo6bq26huau7"] [ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"] [ext_resource type="Texture2D" uid="uid://d3fpq76anm4t7" path="res://world/Background Prototype/Background prototype.png" id="3_kek77"] @@ -82,6 +82,9 @@ texture = ExtResource("3_kek77") script = ExtResource("10_efxa6") boss = ExtResource("11_efxa6") +[node name="Boss" parent="." instance=ExtResource("11_efxa6")] +position = Vector2(0, -3500) + [connection signal="active_item_changed" from="Player" to="UIOverlay/ItemUI" method="_on_player_active_item_changed"] [connection signal="health_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_health_changed"] [connection signal="max_hp_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_max_hp_changed"] diff --git a/player/Attack animation 2/Attack animation 2 0.png b/player/Attack animation 2/Attack animation 2 0.png new file mode 100644 index 0000000..6e43f64 Binary files /dev/null and b/player/Attack animation 2/Attack animation 2 0.png differ diff --git a/player/Attack animation 2/Attack animation 2 0.png.import b/player/Attack animation 2/Attack animation 2 0.png.import new file mode 100644 index 0000000..e2b91d6 --- /dev/null +++ b/player/Attack animation 2/Attack animation 2 0.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ds8mbsjrianb3" +path="res://.godot/imported/Attack animation 2 0.png-bee614c7048cfe5af9fb2b5e7ae9f4cf.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/Attack animation 2/Attack animation 2 0.png" +dest_files=["res://.godot/imported/Attack animation 2 0.png-bee614c7048cfe5af9fb2b5e7ae9f4cf.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/player/Attack animation 2/Attack animation 2 1.png b/player/Attack animation 2/Attack animation 2 1.png new file mode 100644 index 0000000..d2e046f Binary files /dev/null and b/player/Attack animation 2/Attack animation 2 1.png differ diff --git a/player/Attack animation 2/Attack animation 2 1.png.import b/player/Attack animation 2/Attack animation 2 1.png.import new file mode 100644 index 0000000..4a27de0 --- /dev/null +++ b/player/Attack animation 2/Attack animation 2 1.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dxr4idwjaq4kx" +path="res://.godot/imported/Attack animation 2 1.png-8ef772c290f1c8402be5769b56bb7538.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/Attack animation 2/Attack animation 2 1.png" +dest_files=["res://.godot/imported/Attack animation 2 1.png-8ef772c290f1c8402be5769b56bb7538.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/player/Attack animation 2/Attack animation 2 2.png b/player/Attack animation 2/Attack animation 2 2.png new file mode 100644 index 0000000..61a5be7 Binary files /dev/null and b/player/Attack animation 2/Attack animation 2 2.png differ diff --git a/player/Attack animation 2/Attack animation 2 2.png.import b/player/Attack animation 2/Attack animation 2 2.png.import new file mode 100644 index 0000000..7a1af31 --- /dev/null +++ b/player/Attack animation 2/Attack animation 2 2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://doywx3flx6pvo" +path="res://.godot/imported/Attack animation 2 2.png-feec64f4578890aefe95de6c606f280c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/Attack animation 2/Attack animation 2 2.png" +dest_files=["res://.godot/imported/Attack animation 2 2.png-feec64f4578890aefe95de6c606f280c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/player/Attack animation 2/Attack animation 2 3.png b/player/Attack animation 2/Attack animation 2 3.png new file mode 100644 index 0000000..c3df9ea Binary files /dev/null and b/player/Attack animation 2/Attack animation 2 3.png differ diff --git a/player/Attack animation 2/Attack animation 2 3.png.import b/player/Attack animation 2/Attack animation 2 3.png.import new file mode 100644 index 0000000..0a29c71 --- /dev/null +++ b/player/Attack animation 2/Attack animation 2 3.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bs8rolxcg4bib" +path="res://.godot/imported/Attack animation 2 3.png-e4dcdf8f3b19eca3490909d397f2acff.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/Attack animation 2/Attack animation 2 3.png" +dest_files=["res://.godot/imported/Attack animation 2 3.png-e4dcdf8f3b19eca3490909d397f2acff.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/player/Attack animation 2/Attack animation 2 4 .png b/player/Attack animation 2/Attack animation 2 4 .png new file mode 100644 index 0000000..bed801e Binary files /dev/null and b/player/Attack animation 2/Attack animation 2 4 .png differ diff --git a/player/Attack animation 2/Attack animation 2 4 .png.import b/player/Attack animation 2/Attack animation 2 4 .png.import new file mode 100644 index 0000000..0a2a0d5 --- /dev/null +++ b/player/Attack animation 2/Attack animation 2 4 .png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://6su58pdrqqhd" +path="res://.godot/imported/Attack animation 2 4 .png-45fcef78e48a7653417b05de25a236d4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/Attack animation 2/Attack animation 2 4 .png" +dest_files=["res://.godot/imported/Attack animation 2 4 .png-45fcef78e48a7653417b05de25a236d4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/player/player.tscn b/player/player.tscn index a4c23a6..c893ddb 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -1,18 +1,19 @@ -[gd_scene load_steps=19 format=3 uid="uid://cmaovvr15b3qk"] +[gd_scene load_steps=20 format=3 uid="uid://cmaovvr15b3qk"] [ext_resource type="Script" uid="uid://ddidj1uau28ck" path="res://player/player.gd" id="1_4flbx"] [ext_resource type="Texture2D" uid="uid://c4xg25s8loxp0" path="res://player/Player_Walk/Walk 1.png" id="2_hg6s5"] [ext_resource type="Texture2D" uid="uid://chxob4jg7qhqu" path="res://player/Player_Walk/Walk 2.png" id="3_8t03j"] -[ext_resource type="Texture2D" uid="uid://7asmyuhicfoj" path="res://player/attack_animation/Attack Animation 0.png" id="3_32hag"] [ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_i3pqv"] +[ext_resource type="Texture2D" uid="uid://ds8mbsjrianb3" path="res://player/Attack animation 2/Attack animation 2 0.png" id="3_tqiix"] [ext_resource type="Texture2D" uid="uid://vwbnqmbol6hh" path="res://player/Player_Walk/Walk 3.png" id="4_2ieo8"] -[ext_resource type="Texture2D" uid="uid://c4klsmctmol5b" path="res://player/attack_animation/Attack Animation 1.png" id="4_tqiix"] +[ext_resource type="Texture2D" uid="uid://dxr4idwjaq4kx" path="res://player/Attack animation 2/Attack animation 2 1.png" id="4_e7oew"] [ext_resource type="PackedScene" uid="uid://d3e3kuyeh6mr1" path="res://player/sword.tscn" id="4_yw30f"] -[ext_resource type="Texture2D" uid="uid://c8xmypqf63l8f" path="res://player/attack_animation/Attack Animation 2.png" id="5_e7oew"] +[ext_resource type="Texture2D" uid="uid://doywx3flx6pvo" path="res://player/Attack animation 2/Attack animation 2 2.png" id="5_c35mf"] [ext_resource type="Texture2D" uid="uid://dawbam413fob" path="res://player/Player_Walk/Walk 4.png" id="5_ebec5"] -[ext_resource type="Texture2D" uid="uid://em1kmgnaikc1" path="res://player/attack_animation/Attack Animation 3.png" id="6_c35mf"] +[ext_resource type="Texture2D" uid="uid://bs8rolxcg4bib" path="res://player/Attack animation 2/Attack animation 2 3.png" id="6_65viv"] [ext_resource type="Texture2D" uid="uid://y32k1koww7oy" path="res://player/Player_Walk/Walk 5.png" id="6_yllr7"] [ext_resource type="Texture2D" uid="uid://bo7h3yc40kon3" path="res://player/Player_Walk/Walk 6.png" id="7_kb6p2"] +[ext_resource type="Texture2D" uid="uid://6su58pdrqqhd" path="res://player/Attack animation 2/Attack animation 2 4 .png" id="7_x7c3f"] [ext_resource type="PackedScene" uid="uid://beotdg4etmevc" path="res://player/double_jump/double_jump_animation.tscn" id="10_8t03j"] [ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="11_2ieo8"] [ext_resource type="AudioStream" uid="uid://ds0yw3au0quae" path="res://sounds/whoosh.mp3" id="12_ebec5"] @@ -23,20 +24,23 @@ animations = [{ "frames": [{ "duration": 1.0, -"texture": ExtResource("3_32hag") +"texture": ExtResource("3_tqiix") }, { "duration": 1.0, -"texture": ExtResource("4_tqiix") +"texture": ExtResource("4_e7oew") }, { "duration": 1.0, -"texture": ExtResource("5_e7oew") +"texture": ExtResource("5_c35mf") }, { "duration": 1.0, -"texture": ExtResource("6_c35mf") +"texture": ExtResource("6_65viv") +}, { +"duration": 1.0, +"texture": ExtResource("7_x7c3f") }], "loop": false, "name": &"attack", -"speed": 10.0 +"speed": 20.0 }, { "frames": [{ "duration": 1.0, @@ -85,7 +89,7 @@ shape = SubResource("CapsuleShape2D_onrkg") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] scale = Vector2(0.37, 0.37) sprite_frames = SubResource("SpriteFrames_dw050") -animation = &"idle" +animation = &"attack" [node name="EarthAligner" parent="." instance=ExtResource("3_i3pqv")] diff --git a/utils/Platform 1.png b/utils/Platform 1.png new file mode 100644 index 0000000..a56524e Binary files /dev/null and b/utils/Platform 1.png differ diff --git a/utils/Platform 1.png.import b/utils/Platform 1.png.import new file mode 100644 index 0000000..d9f1b47 --- /dev/null +++ b/utils/Platform 1.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b5v7fsww747vl" +path="res://.godot/imported/Platform 1.png-9cb190f099fbfbaead0eef4e06366e50.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://utils/Platform 1.png" +dest_files=["res://.godot/imported/Platform 1.png-9cb190f099fbfbaead0eef4e06366e50.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/utils/Platform 2.png b/utils/Platform 2.png new file mode 100644 index 0000000..7c4dcad Binary files /dev/null and b/utils/Platform 2.png differ diff --git a/utils/Platform 2.png.import b/utils/Platform 2.png.import new file mode 100644 index 0000000..7b8e277 --- /dev/null +++ b/utils/Platform 2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://br11vkbla1yp0" +path="res://.godot/imported/Platform 2.png-afae43c285433ad902f6c15349191f7c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://utils/Platform 2.png" +dest_files=["res://.godot/imported/Platform 2.png-afae43c285433ad902f6c15349191f7c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/utils/platform.gd b/utils/platform.gd index 3c5dfda..ee867da 100644 --- a/utils/platform.gd +++ b/utils/platform.gd @@ -1,6 +1,11 @@ class_name Platform extends StaticBody2D var building +func _ready() -> void: + if(randf() > 0.5): + $Sprite2D.visible = true + $Sprite2D2.visible = false + func init_at_horizontal_distortion(distortion : float): scale.x *= distortion diff --git a/utils/platform.tscn b/utils/platform.tscn index a271e6c..65a3256 100644 --- a/utils/platform.tscn +++ b/utils/platform.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=5 format=3 uid="uid://4l3elvxpghw8"] +[gd_scene load_steps=6 format=3 uid="uid://4l3elvxpghw8"] [ext_resource type="Script" uid="uid://dwmquoam37sve" path="res://utils/platform.gd" id="1_c1gtx"] [ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_c1gtx"] -[ext_resource type="Texture2D" uid="uid://dx1q5flmub36" path="res://utils/platform.png" id="2_olh5f"] +[ext_resource type="Texture2D" uid="uid://b5v7fsww747vl" path="res://utils/Platform 1.png" id="2_nh5rx"] +[ext_resource type="Texture2D" uid="uid://br11vkbla1yp0" path="res://utils/Platform 2.png" id="3_5pr7v"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ry5bi"] size = Vector2(56, 6) @@ -18,8 +19,14 @@ one_way_collision = true one_way_collision_margin = 2.0 [node name="Sprite2D" type="Sprite2D" parent="."] -position = Vector2(-0.359969, 9.03226) -scale = Vector2(0.122334, 0.1) -texture = ExtResource("2_olh5f") +visible = false +position = Vector2(0.7199424, -0.64516133) +scale = Vector2(0.245, 0.245) +texture = ExtResource("2_nh5rx") + +[node name="Sprite2D2" type="Sprite2D" parent="."] +position = Vector2(0.7199424, -0.64516133) +scale = Vector2(0.245, 0.245) +texture = ExtResource("3_5pr7v") [node name="EarthAligner" parent="." instance=ExtResource("2_c1gtx")]