diff --git a/growth/CardInjects/Mine/mine.gd b/growth/CardInjects/Mine/mine.gd index 8bce750..efce1a9 100644 --- a/growth/CardInjects/Mine/mine.gd +++ b/growth/CardInjects/Mine/mine.gd @@ -4,18 +4,21 @@ extends Node2D @export var knockback_strength = 4 func _on_area_entered(area: Area2D) -> void: - if self.get_parent().is_in_group("Virus"): - # Prevent friendly fire - return - var area_parent = area.get_parent() - if (area_parent.is_in_group("Virus")): - area_parent.take_hit(damage, self.position.direction_to(area.position) * 50, knockback_strength) + print_debug("Mine triggered by area: %s" % area) + if self.get_parent().is_in_group("Virus"): + # Prevent friendly fire + return + if area.name != "Hurtbox": + return + var area_parent = area.get_parent() + if (area_parent.is_in_group("Virus")): + area_parent.take_hit(damage, self.position.direction_to(area.position) * 200, knockback_strength) func _on_body_entered(body): - if self.get_parent() == body: - return - body.take_hit(damage, self.position.direction_to(body.position) * 50, knockback_strength) + if self.get_parent() == body: + return + body.take_hit(damage, self.position.direction_to(body.position) * 200, knockback_strength) func _on_timer_timeout(): - self.queue_free() \ No newline at end of file + self.queue_free() diff --git a/growth/CardInjects/Mine/mine.tscn b/growth/CardInjects/Mine/mine.tscn index ddd9b99..f6466de 100644 --- a/growth/CardInjects/Mine/mine.tscn +++ b/growth/CardInjects/Mine/mine.tscn @@ -1,41 +1,96 @@ -[gd_scene load_steps=5 format=3 uid="uid://umv7m1lf4x6b"] +[gd_scene load_steps=19 format=3 uid="uid://umv7m1lf4x6b"] [ext_resource type="Script" uid="uid://b3jims0gq4tg5" path="res://CardInjects/Mine/mine.gd" id="1_mj2xh"] -[ext_resource type="Texture2D" uid="uid://dmq8shsoq55dx" path="res://assets/icons/Mine_symbol.png" id="2_80s1i"] +[ext_resource type="Texture2D" uid="uid://dbt8vgmh44cxo" path="res://assets/animations/Artillery_targetting/Spawn 1.png" id="2_683te"] +[ext_resource type="Texture2D" uid="uid://5ucbb3rk5xhj" path="res://assets/animations/Artillery_targetting/Spawn 2.png" id="3_pa2jo"] +[ext_resource type="Texture2D" uid="uid://dbkwg52jepemv" path="res://assets/animations/Artillery_targetting/Spawn 3.png" id="4_drty8"] +[ext_resource type="Texture2D" uid="uid://c7grn38fw3lw6" path="res://assets/animations/Artillery_targetting/Spawn 4.png" id="5_000rd"] +[ext_resource type="Texture2D" uid="uid://c5n8hm2mv2yxe" path="res://assets/animations/Artillery_targetting/Spawn 5.png" id="6_jp6wk"] +[ext_resource type="Texture2D" uid="uid://vac6wgrr84k" path="res://assets/animations/Artillery_targetting/Spawn 6.png" id="7_tekv1"] +[ext_resource type="Texture2D" uid="uid://couf2b13fgqyk" path="res://assets/animations/Artillery_targetting/Spawn 7.png" id="8_jjqb6"] +[ext_resource type="Texture2D" uid="uid://gj3e486umo7p" path="res://assets/animations/Artillery_targetting/Spawn 8.png" id="9_tltwf"] +[ext_resource type="Texture2D" uid="uid://dk2jjpj56i2yw" path="res://assets/animations/Artillery_targetting/Spawn 9.png" id="10_fg2lw"] +[ext_resource type="Texture2D" uid="uid://cuspftqwqgyqx" path="res://assets/animations/Artillery_targetting/Spawn 10.png" id="11_4dpqo"] +[ext_resource type="Texture2D" uid="uid://ieu5rrxkgnr4" path="res://assets/animations/Artillery_targetting/Spawn 11.png" id="12_7ob5g"] +[ext_resource type="Texture2D" uid="uid://dkqy0usefgkxv" path="res://assets/animations/Artillery_targetting/Spawn 12.png" id="13_4qfex"] +[ext_resource type="Texture2D" uid="uid://bwqpwwhqaaeo5" path="res://assets/animations/Artillery_targetting/Spawn 13.png" id="14_nv14w"] +[ext_resource type="Texture2D" uid="uid://b04e5h551lqxf" path="res://assets/animations/Artillery_targetting/Spawn 14.png" id="15_rp2iw"] +[ext_resource type="Texture2D" uid="uid://clwtlqbp23jpq" path="res://assets/animations/Artillery_targetting/Spawn 15.png" id="16_d51cl"] -[sub_resource type="Shader" id="Shader_80s1i"] -code = "shader_type canvas_item; +[sub_resource type="SpriteFrames" id="SpriteFrames_4ojra"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2_683te") +}, { +"duration": 1.0, +"texture": ExtResource("3_pa2jo") +}, { +"duration": 1.0, +"texture": ExtResource("4_drty8") +}, { +"duration": 1.0, +"texture": ExtResource("5_000rd") +}, { +"duration": 1.0, +"texture": ExtResource("6_jp6wk") +}, { +"duration": 1.0, +"texture": ExtResource("7_tekv1") +}, { +"duration": 1.0, +"texture": ExtResource("8_jjqb6") +}, { +"duration": 1.0, +"texture": ExtResource("9_tltwf") +}, { +"duration": 1.0, +"texture": ExtResource("10_fg2lw") +}, { +"duration": 1.0, +"texture": ExtResource("11_4dpqo") +}, { +"duration": 1.0, +"texture": ExtResource("12_7ob5g") +}, { +"duration": 1.0, +"texture": ExtResource("13_4qfex") +}, { +"duration": 1.0, +"texture": ExtResource("14_nv14w") +}, { +"duration": 1.0, +"texture": ExtResource("15_rp2iw") +}, { +"duration": 1.0, +"texture": ExtResource("16_d51cl") +}], +"loop": false, +"name": &"default", +"speed": 10.0 +}] -void vertex() { - // Called for every vertex the material is visible on. -} - -void fragment() { - COLOR.y = 1.0; -} - -//void light() { -// // Called for every pixel for every light affecting the CanvasItem. -// // Uncomment to replace the default light processing function with this one. -//} -" - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_56tnn"] -shader = SubResource("Shader_80s1i") +[sub_resource type="CircleShape2D" id="CircleShape2D_80s1i"] +radius = 135.0 [node name="Mine" type="Node2D"] script = ExtResource("1_mj2xh") -[node name="Sprite2D" type="Sprite2D" parent="."] -material = SubResource("ShaderMaterial_56tnn") -texture = ExtResource("2_80s1i") +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_4ojra") +autoplay = "default" +frame = 14 +frame_progress = 1.0 [node name="Area2D" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +shape = SubResource("CircleShape2D_80s1i") [node name="Timer" type="Timer" parent="."] one_shot = true autostart = true +[connection signal="area_entered" from="Area2D" to="." method="_on_area_entered"] +[connection signal="body_entered" from="Area2D" to="." method="_on_body_entered"] [connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] diff --git a/growth/assets/animations/Artillery_targetting/Spawn 1.png b/growth/assets/animations/Artillery_targetting/Spawn 1.png new file mode 100644 index 0000000..803ac7b Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 1.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 1.png.import b/growth/assets/animations/Artillery_targetting/Spawn 1.png.import new file mode 100644 index 0000000..0b59a8a --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 1.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbt8vgmh44cxo" +path="res://.godot/imported/Spawn 1.png-acfc4e7530cfafd2d32be9c0071f63fc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 1.png" +dest_files=["res://.godot/imported/Spawn 1.png-acfc4e7530cfafd2d32be9c0071f63fc.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/growth/assets/animations/Artillery_targetting/Spawn 10.png b/growth/assets/animations/Artillery_targetting/Spawn 10.png new file mode 100644 index 0000000..3e3cfe1 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 10.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 10.png.import b/growth/assets/animations/Artillery_targetting/Spawn 10.png.import new file mode 100644 index 0000000..da7d979 --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 10.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cuspftqwqgyqx" +path="res://.godot/imported/Spawn 10.png-1b3c836a093f4e38feef1bd44d50a938.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 10.png" +dest_files=["res://.godot/imported/Spawn 10.png-1b3c836a093f4e38feef1bd44d50a938.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/growth/assets/animations/Artillery_targetting/Spawn 11.png b/growth/assets/animations/Artillery_targetting/Spawn 11.png new file mode 100644 index 0000000..a480ca0 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 11.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 11.png.import b/growth/assets/animations/Artillery_targetting/Spawn 11.png.import new file mode 100644 index 0000000..0c37d7a --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 11.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ieu5rrxkgnr4" +path="res://.godot/imported/Spawn 11.png-b24cf04d2494df7738a10ef35139b538.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 11.png" +dest_files=["res://.godot/imported/Spawn 11.png-b24cf04d2494df7738a10ef35139b538.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/growth/assets/animations/Artillery_targetting/Spawn 12.png b/growth/assets/animations/Artillery_targetting/Spawn 12.png new file mode 100644 index 0000000..f661717 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 12.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 12.png.import b/growth/assets/animations/Artillery_targetting/Spawn 12.png.import new file mode 100644 index 0000000..a1e67ff --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 12.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dkqy0usefgkxv" +path="res://.godot/imported/Spawn 12.png-85670a95b7f8d864cd1c701b1657f25e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 12.png" +dest_files=["res://.godot/imported/Spawn 12.png-85670a95b7f8d864cd1c701b1657f25e.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/growth/assets/animations/Artillery_targetting/Spawn 13.png b/growth/assets/animations/Artillery_targetting/Spawn 13.png new file mode 100644 index 0000000..f7e4a20 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 13.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 13.png.import b/growth/assets/animations/Artillery_targetting/Spawn 13.png.import new file mode 100644 index 0000000..98ab03d --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 13.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bwqpwwhqaaeo5" +path="res://.godot/imported/Spawn 13.png-a5e922b172be7e76a32babc706fb98ac.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 13.png" +dest_files=["res://.godot/imported/Spawn 13.png-a5e922b172be7e76a32babc706fb98ac.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/growth/assets/animations/Artillery_targetting/Spawn 14.png b/growth/assets/animations/Artillery_targetting/Spawn 14.png new file mode 100644 index 0000000..a2d84c6 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 14.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 14.png.import b/growth/assets/animations/Artillery_targetting/Spawn 14.png.import new file mode 100644 index 0000000..adcd30a --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 14.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b04e5h551lqxf" +path="res://.godot/imported/Spawn 14.png-34d301fb9da8e49bb2b59a67a18ada67.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 14.png" +dest_files=["res://.godot/imported/Spawn 14.png-34d301fb9da8e49bb2b59a67a18ada67.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/growth/assets/animations/Artillery_targetting/Spawn 15.png b/growth/assets/animations/Artillery_targetting/Spawn 15.png new file mode 100644 index 0000000..e4fc9e2 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 15.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 15.png.import b/growth/assets/animations/Artillery_targetting/Spawn 15.png.import new file mode 100644 index 0000000..bb6eefb --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 15.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://clwtlqbp23jpq" +path="res://.godot/imported/Spawn 15.png-ee1e43f39eb2c3e8cc882772712d5d47.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 15.png" +dest_files=["res://.godot/imported/Spawn 15.png-ee1e43f39eb2c3e8cc882772712d5d47.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/growth/assets/animations/Artillery_targetting/Spawn 2.png b/growth/assets/animations/Artillery_targetting/Spawn 2.png new file mode 100644 index 0000000..0f2caa0 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 2.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 2.png.import b/growth/assets/animations/Artillery_targetting/Spawn 2.png.import new file mode 100644 index 0000000..5b59dde --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://5ucbb3rk5xhj" +path="res://.godot/imported/Spawn 2.png-2e5d728de3fcb300cc79fb07b694ad96.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 2.png" +dest_files=["res://.godot/imported/Spawn 2.png-2e5d728de3fcb300cc79fb07b694ad96.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/growth/assets/animations/Artillery_targetting/Spawn 3.png b/growth/assets/animations/Artillery_targetting/Spawn 3.png new file mode 100644 index 0000000..08d2b51 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 3.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 3.png.import b/growth/assets/animations/Artillery_targetting/Spawn 3.png.import new file mode 100644 index 0000000..118a805 --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 3.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbkwg52jepemv" +path="res://.godot/imported/Spawn 3.png-295c269a63ff65eba72b2b634115b031.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 3.png" +dest_files=["res://.godot/imported/Spawn 3.png-295c269a63ff65eba72b2b634115b031.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/growth/assets/animations/Artillery_targetting/Spawn 4.png b/growth/assets/animations/Artillery_targetting/Spawn 4.png new file mode 100644 index 0000000..a9a0e10 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 4.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 4.png.import b/growth/assets/animations/Artillery_targetting/Spawn 4.png.import new file mode 100644 index 0000000..4249ccd --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 4.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c7grn38fw3lw6" +path="res://.godot/imported/Spawn 4.png-10f21b34165bd7914f8cc5a8dc40bf64.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 4.png" +dest_files=["res://.godot/imported/Spawn 4.png-10f21b34165bd7914f8cc5a8dc40bf64.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/growth/assets/animations/Artillery_targetting/Spawn 5.png b/growth/assets/animations/Artillery_targetting/Spawn 5.png new file mode 100644 index 0000000..c705dc4 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 5.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 5.png.import b/growth/assets/animations/Artillery_targetting/Spawn 5.png.import new file mode 100644 index 0000000..c847cad --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 5.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c5n8hm2mv2yxe" +path="res://.godot/imported/Spawn 5.png-e84a7476c4edce97f4a31018ea594832.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 5.png" +dest_files=["res://.godot/imported/Spawn 5.png-e84a7476c4edce97f4a31018ea594832.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/growth/assets/animations/Artillery_targetting/Spawn 6.png b/growth/assets/animations/Artillery_targetting/Spawn 6.png new file mode 100644 index 0000000..f69efab Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 6.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 6.png.import b/growth/assets/animations/Artillery_targetting/Spawn 6.png.import new file mode 100644 index 0000000..ca10526 --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 6.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://vac6wgrr84k" +path="res://.godot/imported/Spawn 6.png-d0f8c8ee00a67c9a50f6335d79aa2115.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 6.png" +dest_files=["res://.godot/imported/Spawn 6.png-d0f8c8ee00a67c9a50f6335d79aa2115.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/growth/assets/animations/Artillery_targetting/Spawn 7.png b/growth/assets/animations/Artillery_targetting/Spawn 7.png new file mode 100644 index 0000000..5f0de7d Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 7.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 7.png.import b/growth/assets/animations/Artillery_targetting/Spawn 7.png.import new file mode 100644 index 0000000..458bdf0 --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 7.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://couf2b13fgqyk" +path="res://.godot/imported/Spawn 7.png-0ad504abddb09227a6f7939cfd6e40b4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 7.png" +dest_files=["res://.godot/imported/Spawn 7.png-0ad504abddb09227a6f7939cfd6e40b4.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/growth/assets/animations/Artillery_targetting/Spawn 8.png b/growth/assets/animations/Artillery_targetting/Spawn 8.png new file mode 100644 index 0000000..8c4c488 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 8.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 8.png.import b/growth/assets/animations/Artillery_targetting/Spawn 8.png.import new file mode 100644 index 0000000..56f7bc1 --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 8.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://gj3e486umo7p" +path="res://.godot/imported/Spawn 8.png-411836e56c55d70a41ba749cc31bef80.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 8.png" +dest_files=["res://.godot/imported/Spawn 8.png-411836e56c55d70a41ba749cc31bef80.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/growth/assets/animations/Artillery_targetting/Spawn 9.png b/growth/assets/animations/Artillery_targetting/Spawn 9.png new file mode 100644 index 0000000..745fb89 Binary files /dev/null and b/growth/assets/animations/Artillery_targetting/Spawn 9.png differ diff --git a/growth/assets/animations/Artillery_targetting/Spawn 9.png.import b/growth/assets/animations/Artillery_targetting/Spawn 9.png.import new file mode 100644 index 0000000..24c7634 --- /dev/null +++ b/growth/assets/animations/Artillery_targetting/Spawn 9.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dk2jjpj56i2yw" +path="res://.godot/imported/Spawn 9.png-8249925e436fc01a339156fe792700f4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Artillery_targetting/Spawn 9.png" +dest_files=["res://.godot/imported/Spawn 9.png-8249925e436fc01a339156fe792700f4.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/growth/assets/animations/Shield_animations/Shield up.png b/growth/assets/animations/Shield_animations/Shield up.png new file mode 100644 index 0000000..ce4b38a Binary files /dev/null and b/growth/assets/animations/Shield_animations/Shield up.png differ diff --git a/growth/assets/animations/Shield_animations/Shield up.png.import b/growth/assets/animations/Shield_animations/Shield up.png.import new file mode 100644 index 0000000..f3b2c27 --- /dev/null +++ b/growth/assets/animations/Shield_animations/Shield up.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c45wkn2k85clo" +path="res://.godot/imported/Shield up.png-80113db99ad5afa8303b99e08d69704c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Shield_animations/Shield up.png" +dest_files=["res://.godot/imported/Shield up.png-80113db99ad5afa8303b99e08d69704c.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/growth/assets/animations/Shield_animations/Spawn_despawn 1.png b/growth/assets/animations/Shield_animations/Spawn_despawn 1.png new file mode 100644 index 0000000..f1659c7 Binary files /dev/null and b/growth/assets/animations/Shield_animations/Spawn_despawn 1.png differ diff --git a/growth/assets/animations/Shield_animations/Spawn_despawn 1.png.import b/growth/assets/animations/Shield_animations/Spawn_despawn 1.png.import new file mode 100644 index 0000000..7d5bf71 --- /dev/null +++ b/growth/assets/animations/Shield_animations/Spawn_despawn 1.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bsp5t48l7356k" +path="res://.godot/imported/Spawn_despawn 1.png-8288d0722e693e6cb26fa48cc3464b27.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Shield_animations/Spawn_despawn 1.png" +dest_files=["res://.godot/imported/Spawn_despawn 1.png-8288d0722e693e6cb26fa48cc3464b27.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/growth/assets/animations/Shield_animations/dpawn_desparn 2.png b/growth/assets/animations/Shield_animations/dpawn_desparn 2.png new file mode 100644 index 0000000..f272ee2 Binary files /dev/null and b/growth/assets/animations/Shield_animations/dpawn_desparn 2.png differ diff --git a/growth/assets/animations/Shield_animations/dpawn_desparn 2.png.import b/growth/assets/animations/Shield_animations/dpawn_desparn 2.png.import new file mode 100644 index 0000000..d2c5ad3 --- /dev/null +++ b/growth/assets/animations/Shield_animations/dpawn_desparn 2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bnqrlq14jwuud" +path="res://.godot/imported/dpawn_desparn 2.png-7a79c4dcc20ac2bcd7ba55fb79acc905.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/animations/Shield_animations/dpawn_desparn 2.png" +dest_files=["res://.godot/imported/dpawn_desparn 2.png-7a79c4dcc20ac2bcd7ba55fb79acc905.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/growth/hand.gd b/growth/hand.gd index 27ada26..04d3bc9 100644 --- a/growth/hand.gd +++ b/growth/hand.gd @@ -149,6 +149,7 @@ func shuffle_deck(): drawpile.shuffle(); # active_card_index = 0; get_node(player).shield_active = true; + get_node(player).get_node("Shield").visible = true; highlight_card(active_card_index) func get_cards() -> Array: diff --git a/growth/level.tscn b/growth/level.tscn index 24352d2..211829d 100644 --- a/growth/level.tscn +++ b/growth/level.tscn @@ -4,8 +4,8 @@ [ext_resource type="PackedScene" uid="uid://bsv3h2lpv7h77" path="res://virus.tscn" id="2_oi3di"] [ext_resource type="PackedScene" uid="uid://bldi3fw0vmlu3" path="res://music.tscn" id="3_oi3di"] [ext_resource type="TileSet" uid="uid://c20bl25rqyf68" path="res://assets/tiles/new_tile_set.tres" id="4_0b4ue"] -[ext_resource type="PackedScene" uid="uid://co8jnr2dew5ts" path="res://hand.tscn" id="5_f2txt"] -[ext_resource type="Script" uid="uid://dycpk6lxabn1l" path="res://virus_spawner.gd" id="6_1ainy"] +[ext_resource type="PackedScene" uid="uid://cpp7v4jp8kt74" path="res://hand.tscn" id="5_f2txt"] +[ext_resource type="Script" path="res://virus_spawner.gd" id="6_1ainy"] [node name="Level" type="Node2D"] @@ -25,6 +25,17 @@ scale = Vector2(2, 2) [node name="Hand" parent="CanvasLayer" instance=ExtResource("5_f2txt")] unique_name_in_owner = true +[node name="ScoreCounter" type="RichTextLabel" parent="CanvasLayer"] +unique_name_in_owner = true +offset_left = 16.0 +offset_top = 19.0 +offset_right = 117.0 +offset_bottom = 65.0 +text = "Score: 0 +High Score: 0" +fit_content = true +autowrap_mode = 0 + [node name="VirusSpawner" type="Node" parent="."] script = ExtResource("6_1ainy") Virus = ExtResource("2_oi3di") diff --git a/growth/player.gd b/growth/player.gd index d54a977..33d04eb 100644 --- a/growth/player.gd +++ b/growth/player.gd @@ -10,6 +10,11 @@ enum MoveState {Still, Moving, Dashing, Knockback} @onready var camera: Camera2D = %PlayerCamera @onready var sprite: AnimatedSprite2D = $PlayerSprite @onready var hand: Control = %Hand; +@onready var shield: Sprite2D = $Shield +@onready var score_counter: RichTextLabel = %ScoreCounter + +var score = 0; +var high_score = 0; var shield_active = true; var move_direction = Vector2.ZERO; @@ -114,9 +119,20 @@ func take_hit(_damage, knockback_vector, knockback_strength = 1): move_state = MoveState.Knockback; velocity = knockback_vector; knockback_timer.start(0.2 * knockback_strength); + $Shield.visible = false; else: reboot(); +func add_to_score(amount): + score += amount; + if score > high_score: + high_score = score; + score_counter.text = "Score: %d\nHigh Score: %d" % [score, high_score] + +func reset_score(): + score = 0; + score_counter.text = "Score: %d\nHigh Score: %d" % [score, high_score] + func reboot(): # Called when the player dies # For now, just reset position and state @@ -124,4 +140,6 @@ func reboot(): velocity = Vector2.ZERO; move_state = MoveState.Still; shield_active = true; + $Shield.visible = true; + reset_score(); # hand.discard_all(); diff --git a/growth/player.tscn b/growth/player.tscn index 7d971d3..174d7fb 100644 --- a/growth/player.tscn +++ b/growth/player.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=6 format=3 uid="uid://dhhnr3xkxbxlu"] +[gd_scene load_steps=7 format=3 uid="uid://dhhnr3xkxbxlu"] [ext_resource type="Script" uid="uid://b6lfgkrbmr8ee" path="res://player.gd" id="1_4flbx"] [ext_resource type="AudioStream" uid="uid://b4g7622b8mxeg" path="res://assets/sfx/damage_taken.wav" id="2_i3pqv"] [ext_resource type="Texture2D" uid="uid://dcvpult8xfit6" path="res://assets/icons/Nortoff_logo.png" id="2_onrkg"] +[ext_resource type="Texture2D" uid="uid://c45wkn2k85clo" path="res://assets/animations/Shield_animations/Shield up.png" id="4_hqtel"] [sub_resource type="SpriteFrames" id="SpriteFrames_onrkg"] animations = [{ @@ -33,6 +34,10 @@ unique_name_in_owner = true scale = Vector2(0.1, 0.1) sprite_frames = SubResource("SpriteFrames_onrkg") +[node name="Shield" type="Sprite2D" parent="."] +scale = Vector2(0.3, 0.3) +texture = ExtResource("4_hqtel") + [node name="Hurtbox" type="CollisionShape2D" parent="."] scale = Vector2(2.5, 2.5) shape = SubResource("CircleShape2D_i3pqv") diff --git a/growth/virus.gd b/growth/virus.gd index 4c2315d..04e65ab 100644 --- a/growth/virus.gd +++ b/growth/virus.gd @@ -70,6 +70,7 @@ func take_hit(damage, knockback_vector, knockback_strength = 1): else: health -= damage if health <= 0: + get_node("../../Player").add_to_score(1); queue_free() elif knockback_strength > 0: knockback = -knockback_vector;