Merge remote-tracking branch 'origin/main'
@@ -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()
|
||||
self.queue_free()
|
||||
|
||||
@@ -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"]
|
||||
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 1.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 10.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 11.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 12.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 13.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 14.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 15.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 2.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 3.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 4.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 5.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 6.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 7.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 8.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Artillery_targetting/Spawn 9.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Shield_animations/Shield up.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Shield_animations/Spawn_despawn 1.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
@@ -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
|
||||
BIN
growth/assets/animations/Shield_animations/dpawn_desparn 2.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
@@ -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
|
||||
@@ -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:
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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;
|
||||
|
||||