diff --git a/components/Abstracts/EntityBase.tscn b/components/Abstracts/EntityBase.tscn index 210159d..625f25a 100644 --- a/components/Abstracts/EntityBase.tscn +++ b/components/Abstracts/EntityBase.tscn @@ -413,6 +413,8 @@ unique_name_in_owner = true [node name="collect" type="AudioStreamPlayer2D" parent="sounds"] stream = ExtResource("2_qt0aq") +[node name="die" type="AudioStreamPlayer2D" parent="sounds"] + [node name="attack0" type="AudioStreamPlayer2D" parent="sounds"] [node name="texture" type="AnimatedSprite2D" parent="."] diff --git a/components/Bullets/Volcano.tscn b/components/Bullets/Volcano.tscn index a54d46d..e688d00 100644 --- a/components/Bullets/Volcano.tscn +++ b/components/Bullets/Volcano.tscn @@ -112,7 +112,7 @@ point_count = 2 curve = SubResource("Curve_21ih7") [sub_resource type="Gradient" id="Gradient_1sgli"] -colors = PackedColorArray(1, 0, 0, 1, 1, 0.9628792, 0.47369397, 1) +colors = PackedColorArray(1, 0, 0, 1, 1, 0.79906744, 0, 1) [sub_resource type="GradientTexture1D" id="GradientTexture1D_b5nxd"] gradient = SubResource("Gradient_1sgli") @@ -132,10 +132,10 @@ angle_min = 1.0728835e-05 angle_max = 360.00003 angle_curve = SubResource("CurveTexture_6sp0s") spread = 180.0 -initial_velocity_max = 25.0 +initial_velocity_max = 20.0 gravity = Vector3(0, 0, 0) -scale_min = 3.0 -scale_max = 8.0 +scale_min = 2.0 +scale_max = 9.0 scale_curve = SubResource("CurveTexture_21ih7") color_initial_ramp = SubResource("GradientTexture1D_b5nxd") alpha_curve = SubResource("CurveTexture_o5h0y") diff --git a/components/Characters/Cat.tscn b/components/Characters/Cat.tscn new file mode 100644 index 0000000..ba58e2d --- /dev/null +++ b/components/Characters/Cat.tscn @@ -0,0 +1,63 @@ +[gd_scene load_steps=10 format=3 uid="uid://bfkg40awgniv"] + +[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_hw4g4"] +[ext_resource type="Texture2D" uid="uid://cs6se8dighfgj" path="res://resources/characters/cat/cat.png" id="2_q30ge"] +[ext_resource type="Script" uid="uid://chmxghslo4kc4" path="res://scripts/Contents/Characters/Cat.gd" id="2_uo67a"] +[ext_resource type="AudioStream" uid="uid://d2ooclkk70rm0" path="res://resources/sounds/effect/Meow.wav" id="3_bglcc"] +[ext_resource type="AudioStream" uid="uid://chxpw0sprn4kj" path="res://resources/sounds/effect/Police Siren.wav" id="4_2o6vq"] +[ext_resource type="AudioStream" uid="uid://b7pxuov1id0ho" path="res://resources/sounds/effect/Pew.mp3" id="4_rh5rn"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_uo67a"] +animations = [{ +"frames": [], +"loop": true, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [], +"loop": true, +"name": &"walk", +"speed": 5.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_uo67a"] +size = Vector2(81, 62) + +[sub_resource type="CircleShape2D" id="CircleShape2D_uo67a"] +radius = 19.026299 + +[node name="Cat" instance=ExtResource("1_hw4g4")] +script = ExtResource("2_uo67a") + +[node name="hurt" parent="sounds" index="3"] +stream = ExtResource("3_bglcc") +volume_db = -5.0 + +[node name="die" parent="sounds" index="5"] +stream = ExtResource("4_2o6vq") + +[node name="attack0" parent="sounds" index="6"] +stream = ExtResource("4_rh5rn") + +[node name="texture" parent="." index="3"] +sprite_frames = SubResource("SpriteFrames_uo67a") +animation = &"walk" + +[node name="staticBackground" parent="texture" index="0"] +position = Vector2(0, -2) +scale = Vector2(0.2, 0.2) +texture = ExtResource("2_q30ge") + +[node name="staticAnimation" parent="texture" index="1"] +scale = Vector2(1, 1.289) + +[node name="hitbox" parent="texture/hurtbox" index="0"] +position = Vector2(-9.5, 5) +shape = SubResource("RectangleShape2D_uo67a") + +[node name="hitbox2" type="CollisionShape2D" parent="texture/hurtbox" index="1"] +position = Vector2(43, -2) +shape = SubResource("CircleShape2D_uo67a") + +[node name="statebar" parent="." index="4"] +position = Vector2(0, -115) diff --git a/components/Characters/Hen.tscn b/components/Characters/Hen.tscn index 92bae73..d959d33 100644 --- a/components/Characters/Hen.tscn +++ b/components/Characters/Hen.tscn @@ -1,35 +1,28 @@ [gd_scene load_steps=8 format=3 uid="uid://c8h1abpbe6cww"] [ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_twxai"] -[ext_resource type="Script" path="res://scripts/Contents/Characters/Hen.gd" id="2_8u5a0"] -[ext_resource type="Texture2D" uid="uid://b5m0fpg3ewfum" path="res://resources/characters/hen/hen-a.svg" id="2_k7xxq"] -[ext_resource type="Texture2D" uid="uid://3o0oqobnr3b2" path="res://resources/characters/hen/hen-b.svg" id="3_cpiwr"] -[ext_resource type="AudioStream" uid="uid://cxhsnyjhrnicl" path="res://resources/sounds/effect/Glug.wav" id="3_ojyt7"] +[ext_resource type="Script" uid="uid://dsfht8qodraln" path="res://scripts/Contents/Characters/Hen.gd" id="2_8u5a0"] +[ext_resource type="AudioStream" uid="uid://cougu5tprpf8d" path="res://resources/sounds/effect/Growl.wav" id="3_1stll"] +[ext_resource type="Texture2D" uid="uid://ylvq4hek5qem" path="res://resources/characters/hen/hsl.png" id="4_1stll"] [sub_resource type="SpriteFrames" id="SpriteFrames_xwexj"] animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("2_k7xxq") -}], +"frames": [], "loop": true, "name": &"idle", "speed": 5.0 }, { -"frames": [{ -"duration": 1.0, -"texture": ExtResource("2_k7xxq") -}, { -"duration": 1.0, -"texture": ExtResource("3_cpiwr") -}], +"frames": [], "loop": true, "name": &"walk", "speed": 5.0 }] -[sub_resource type="CircleShape2D" id="CircleShape2D_0uubu"] -radius = 40.0 +[sub_resource type="RectangleShape2D" id="RectangleShape2D_1stll"] +size = Vector2(114.5, 43) + +[sub_resource type="CircleShape2D" id="CircleShape2D_rwj47"] +radius = 19.026299 [node name="Hen" instance=ExtResource("1_twxai")] script = ExtResource("2_8u5a0") @@ -38,17 +31,25 @@ drops = Array[int]([0, 1]) dropCounts = Array[Vector2]([Vector2(6, 12), Vector2(4, 8)]) [node name="hurt" parent="sounds" index="3"] -stream = ExtResource("3_ojyt7") +stream = ExtResource("3_1stll") -[node name="texture" parent="." index="2"] +[node name="texture" parent="." index="3"] sprite_frames = SubResource("SpriteFrames_xwexj") -animation = &"walk" + +[node name="staticBackground" parent="texture" index="0"] +scale = Vector2(-0.452, 0.452) +texture = ExtResource("4_1stll") [node name="hitbox" parent="texture/hurtbox" index="0"] -shape = SubResource("CircleShape2D_0uubu") +position = Vector2(7, 4) +shape = SubResource("RectangleShape2D_1stll") + +[node name="hitbox2" type="CollisionShape2D" parent="texture/hurtbox" index="1"] +position = Vector2(72, -28) +shape = SubResource("CircleShape2D_rwj47") [node name="normal" type="Node2D" parent="texture/weapons" index="0"] -[node name="statebar" parent="." index="3" node_paths=PackedStringArray("entity")] +[node name="statebar" parent="." index="4" node_paths=PackedStringArray("entity")] position = Vector2(0, -114) entity = NodePath("..") diff --git a/components/Effects/DeadBlood.tscn b/components/Effects/DeadBlood.tscn index d3a28ae..661cc5f 100644 --- a/components/Effects/DeadBlood.tscn +++ b/components/Effects/DeadBlood.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=12 format=3 uid="uid://b3hoapgh61w3e"] [ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_neao1"] -[ext_resource type="AudioStream" uid="uid://bjtxl0ec0dfw5" path="res://resources/sounds/effect/Squish Pop.wav" id="2_sjht3"] +[ext_resource type="AudioStream" uid="uid://chxpw0sprn4kj" path="res://resources/sounds/effect/Police Siren.wav" id="2_dbg3c"] [sub_resource type="Curve" id="Curve_w5fhr"] _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] @@ -50,7 +50,7 @@ alpha_curve = SubResource("CurveTexture_py1or") spawnSound = "spawn" [node name="spawn" parent="sounds" index="0"] -stream = ExtResource("2_sjht3") +stream = ExtResource("2_dbg3c") [node name="particles" parent="." index="1"] amount = 100 diff --git a/resources/characters/cat/cat.png b/resources/characters/cat/cat.png new file mode 100644 index 0000000..583305b Binary files /dev/null and b/resources/characters/cat/cat.png differ diff --git a/resources/characters/cat/cat.png.import b/resources/characters/cat/cat.png.import new file mode 100644 index 0000000..13edd56 --- /dev/null +++ b/resources/characters/cat/cat.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cs6se8dighfgj" +path="res://.godot/imported/cat.png-f9a9874fcfcddfbfb6327fa6f6c853f6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/characters/cat/cat.png" +dest_files=["res://.godot/imported/cat.png-f9a9874fcfcddfbfb6327fa6f6c853f6.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/resources/characters/hen/hsl.png b/resources/characters/hen/hsl.png new file mode 100644 index 0000000..dacde9f Binary files /dev/null and b/resources/characters/hen/hsl.png differ diff --git a/resources/characters/hen/hsl.png.import b/resources/characters/hen/hsl.png.import new file mode 100644 index 0000000..ea3b5dd --- /dev/null +++ b/resources/characters/hen/hsl.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ylvq4hek5qem" +path="res://.godot/imported/hsl.png-5b21e4961d7594d1bec32482367ff5b0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/characters/hen/hsl.png" +dest_files=["res://.godot/imported/hsl.png-5b21e4961d7594d1bec32482367ff5b0.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/resources/sounds/effect/Growl.wav b/resources/sounds/effect/Growl.wav new file mode 100644 index 0000000..d587daa Binary files /dev/null and b/resources/sounds/effect/Growl.wav differ diff --git a/resources/sounds/effect/Growl.wav.import b/resources/sounds/effect/Growl.wav.import new file mode 100644 index 0000000..6d2e539 --- /dev/null +++ b/resources/sounds/effect/Growl.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cougu5tprpf8d" +path="res://.godot/imported/Growl.wav-ed6a3a5e477556273d7ff74c488b549a.sample" + +[deps] + +source_file="res://resources/sounds/effect/Growl.wav" +dest_files=["res://.godot/imported/Growl.wav-ed6a3a5e477556273d7ff74c488b549a.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/resources/sounds/effect/Meow.wav b/resources/sounds/effect/Meow.wav new file mode 100644 index 0000000..45742d5 Binary files /dev/null and b/resources/sounds/effect/Meow.wav differ diff --git a/resources/sounds/effect/Meow.wav.import b/resources/sounds/effect/Meow.wav.import new file mode 100644 index 0000000..d8da2a6 --- /dev/null +++ b/resources/sounds/effect/Meow.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://d2ooclkk70rm0" +path="res://.godot/imported/Meow.wav-15fe9b6f288788f227e3c31676548924.sample" + +[deps] + +source_file="res://resources/sounds/effect/Meow.wav" +dest_files=["res://.godot/imported/Meow.wav-15fe9b6f288788f227e3c31676548924.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/resources/sounds/effect/Pew.wav b/resources/sounds/effect/Pew.wav new file mode 100644 index 0000000..650697d Binary files /dev/null and b/resources/sounds/effect/Pew.wav differ diff --git a/resources/sounds/effect/Pew.wav.import b/resources/sounds/effect/Pew.wav.import new file mode 100644 index 0000000..a467e8f --- /dev/null +++ b/resources/sounds/effect/Pew.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://bdx5tmwomeqoh" +path="res://.godot/imported/Pew.wav-119e210441e9a157663ef44d4e065c7a.sample" + +[deps] + +source_file="res://resources/sounds/effect/Pew.wav" +dest_files=["res://.godot/imported/Pew.wav-119e210441e9a157663ef44d4e065c7a.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/resources/sounds/effect/Police Siren.wav b/resources/sounds/effect/Police Siren.wav new file mode 100644 index 0000000..dbf955a Binary files /dev/null and b/resources/sounds/effect/Police Siren.wav differ diff --git a/resources/sounds/effect/Police Siren.wav.import b/resources/sounds/effect/Police Siren.wav.import new file mode 100644 index 0000000..e1b6850 --- /dev/null +++ b/resources/sounds/effect/Police Siren.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://chxpw0sprn4kj" +path="res://.godot/imported/Police Siren.wav-d2e4478506f3816fc7928538a610d45f.sample" + +[deps] + +source_file="res://resources/sounds/effect/Police Siren.wav" +dest_files=["res://.godot/imported/Police Siren.wav-d2e4478506f3816fc7928538a610d45f.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/scripts/Contents/Characters/Cat.gd b/scripts/Contents/Characters/Cat.gd new file mode 100644 index 0000000..f6f0504 --- /dev/null +++ b/scripts/Contents/Characters/Cat.gd @@ -0,0 +1,18 @@ +extends EntityBase +class_name Maodie + +func register(): + fields[FieldStore.Entity.MAX_HEALTH] = 75 + fields[FieldStore.Entity.MOVEMENT_SPEED] = randf_range(0.5, 0.8) + attackCooldownMap[0] = randi_range(2500, 6000) + sprintMultiplier = 20 +func ai(): + PresetEntityAI.follow(self, currentFocusedBoss) + tryAttack(0, true) +func attack(type: int): + if type == 0: + BulletBase.generate(ComponentManager.getBullet("ChickSprint"), self, position, 0) + trySprint() + return true +func sprint(): + move((currentFocusedBoss.position - position).normalized() * sprintMultiplier, true) diff --git a/scripts/Contents/Characters/Cat.gd.uid b/scripts/Contents/Characters/Cat.gd.uid new file mode 100644 index 0000000..5b119b0 --- /dev/null +++ b/scripts/Contents/Characters/Cat.gd.uid @@ -0,0 +1 @@ +uid://chmxghslo4kc4 diff --git a/scripts/Contents/Wave.gd b/scripts/Contents/Wave.gd index 17443eb..dbc6990 100644 --- a/scripts/Contents/Wave.gd +++ b/scripts/Contents/Wave.gd @@ -25,6 +25,7 @@ func duplicate() -> Wave: static var current: int = startWith(1) static var WAVE_NORMAL = [ Wave.create("Hen", 1, 5, false, 0, INF, 1), + Wave.create("Cat", 1, 5, false, 0, INF, 1), Wave.create("Chick", 0, 0, true, 9, INF, 15), Wave.create("Bear", 0, 0, true, 19, INF, 10), Wave.create("KukeMC", 0, 0, true, 14, INF, 20), diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index 5794f60..c0e84da 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -133,7 +133,8 @@ func _ready(): else: UIState.energyPercent.setCurrent(newEnergy) ) - rebuildWeaponIcons() + if displayName == MultiplayerState.playerName: + rebuildWeaponIcons() else: applyLevel() health = fields.get(FieldStore.Entity.MAX_HEALTH)