mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-18 16:13:47 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
77b89a8fbc
25 changed files with 799 additions and 56 deletions
20
Resources/Items/Heart_Extend_Pickup.tres
Normal file
20
Resources/Items/Heart_Extend_Pickup.tres
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
[gd_resource type="Resource" script_class="LootItem" load_steps=3 format=3 uid="uid://ciybnocjfpshh"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c8fr1ea20odaw" path="res://Sprites/Items/Heart_Extend.png" id="1_00obu"]
|
||||||
|
[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="3_1s60f"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("3_1s60f")
|
||||||
|
ItemName = &"Health Extend"
|
||||||
|
ItemDescription = &"Extends the max health"
|
||||||
|
ItemKey = &"HEALTH_EXTEND"
|
||||||
|
Item = 13
|
||||||
|
Amount = 1
|
||||||
|
Max = 10
|
||||||
|
PickupIfMaxed = false
|
||||||
|
ConsumeOnUse = true
|
||||||
|
UiType = 0
|
||||||
|
Selectable = false
|
||||||
|
InventorySprite = ExtResource("1_00obu")
|
||||||
|
DropScenePath = &"res://Scenes/Items/Heart_Extend_Pickup.tscn"
|
||||||
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
[gd_resource type="Resource" script_class="SpiralPattern" load_steps=3 format=3 uid="uid://jjky5fqn74qk"]
|
[gd_resource type="Resource" script_class="SpiralPattern" load_steps=4 format=3 uid="uid://jjky5fqn74qk"]
|
||||||
|
|
||||||
[ext_resource type="Resource" uid="uid://bifeoxb6nfykq" path="res://Resources/Bullets/Boss/Rumia/Rumia_Red_Chase_Bullet.tres" id="1_lasr5"]
|
[ext_resource type="Resource" uid="uid://bifeoxb6nfykq" path="res://Resources/Bullets/Boss/Rumia/Rumia_Red_Chase_Bullet.tres" id="1_lasr5"]
|
||||||
|
[ext_resource type="Script" uid="uid://b5s5mjuk1rng5" path="res://Scripts/Resources/TimeModifier.cs" id="2_ho5ah"]
|
||||||
[ext_resource type="Script" uid="uid://c0ndqalsc4jve" path="res://Scripts/AttackPatterns/SpiralPattern.cs" id="3_ryait"]
|
[ext_resource type="Script" uid="uid://c0ndqalsc4jve" path="res://Scripts/AttackPatterns/SpiralPattern.cs" id="3_ryait"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
|
|
@ -15,4 +16,12 @@ burstInterval = 0.3
|
||||||
ShotsPerBurst = 100
|
ShotsPerBurst = 100
|
||||||
BurstRate = 0.0
|
BurstRate = 0.0
|
||||||
_targetPlayer = true
|
_targetPlayer = true
|
||||||
|
OverrideOwner = false
|
||||||
|
Owner = 0
|
||||||
|
OverrideDamageType = false
|
||||||
|
DamageType = 0
|
||||||
|
OverrideControllable = false
|
||||||
|
Controllable = false
|
||||||
|
OverrideCreationModifier = false
|
||||||
|
TimeModifiers = Array[ExtResource("2_ho5ah")]([])
|
||||||
WaitForCompletion = true
|
WaitForCompletion = true
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
[gd_resource type="Resource" script_class="PatternGroup" load_steps=12 format=3 uid="uid://du2kuv125vbrx"]
|
[gd_resource type="Resource" script_class="PatternGroup" load_steps=13 format=3 uid="uid://du2kuv125vbrx"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dre2wvw4pa3hc" path="res://Scenes/Weapons/Bullets/enemyBullet_mid_blue.tscn" id="1_4xpdn"]
|
[ext_resource type="PackedScene" uid="uid://dre2wvw4pa3hc" path="res://Scenes/Weapons/Bullets/enemyBullet_mid_blue.tscn" id="1_4xpdn"]
|
||||||
[ext_resource type="Script" uid="uid://c0ndqalsc4jve" path="res://Scripts/AttackPatterns/SpiralPattern.cs" id="2_ee42k"]
|
[ext_resource type="Script" uid="uid://c0ndqalsc4jve" path="res://Scripts/AttackPatterns/SpiralPattern.cs" id="2_ee42k"]
|
||||||
[ext_resource type="Script" uid="uid://dslyrfcej3g2n" path="res://Scripts/Resources/BulletResource.cs" id="2_gfvud"]
|
[ext_resource type="Script" uid="uid://dslyrfcej3g2n" path="res://Scripts/Resources/BulletResource.cs" id="2_gfvud"]
|
||||||
|
[ext_resource type="Script" uid="uid://b5s5mjuk1rng5" path="res://Scripts/Resources/TimeModifier.cs" id="3_fgjeq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dohakkayqj4w2" path="res://Scenes/Weapons/Bullets/enemyBullet_green.tscn" id="3_gr7a3"]
|
[ext_resource type="PackedScene" uid="uid://dohakkayqj4w2" path="res://Scenes/Weapons/Bullets/enemyBullet_green.tscn" id="3_gr7a3"]
|
||||||
[ext_resource type="Script" uid="uid://cbafxkmgns6ry" path="res://Scripts/Resources/PatternGroup.cs" id="3_jvysx"]
|
[ext_resource type="Script" uid="uid://cbafxkmgns6ry" path="res://Scripts/Resources/PatternGroup.cs" id="3_jvysx"]
|
||||||
|
|
||||||
|
|
@ -31,6 +32,14 @@ burstInterval = 2.0
|
||||||
ShotsPerBurst = 100
|
ShotsPerBurst = 100
|
||||||
BurstRate = 0.0
|
BurstRate = 0.0
|
||||||
_targetPlayer = false
|
_targetPlayer = false
|
||||||
|
OverrideOwner = false
|
||||||
|
Owner = 0
|
||||||
|
OverrideDamageType = false
|
||||||
|
DamageType = 0
|
||||||
|
OverrideControllable = false
|
||||||
|
Controllable = false
|
||||||
|
OverrideCreationModifier = false
|
||||||
|
TimeModifiers = Array[ExtResource("3_fgjeq")]([])
|
||||||
WaitForCompletion = true
|
WaitForCompletion = true
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_wtj61"]
|
[sub_resource type="Resource" id="Resource_wtj61"]
|
||||||
|
|
@ -58,6 +67,14 @@ burstInterval = 2.0
|
||||||
ShotsPerBurst = 100
|
ShotsPerBurst = 100
|
||||||
BurstRate = 0.0
|
BurstRate = 0.0
|
||||||
_targetPlayer = false
|
_targetPlayer = false
|
||||||
|
OverrideOwner = false
|
||||||
|
Owner = 0
|
||||||
|
OverrideDamageType = false
|
||||||
|
DamageType = 0
|
||||||
|
OverrideControllable = false
|
||||||
|
Controllable = false
|
||||||
|
OverrideCreationModifier = false
|
||||||
|
TimeModifiers = Array[ExtResource("3_fgjeq")]([])
|
||||||
WaitForCompletion = true
|
WaitForCompletion = true
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_qbq0m"]
|
[sub_resource type="Resource" id="Resource_qbq0m"]
|
||||||
|
|
@ -85,6 +102,14 @@ burstInterval = 2.0
|
||||||
ShotsPerBurst = 100
|
ShotsPerBurst = 100
|
||||||
BurstRate = 0.0
|
BurstRate = 0.0
|
||||||
_targetPlayer = false
|
_targetPlayer = false
|
||||||
|
OverrideOwner = false
|
||||||
|
Owner = 0
|
||||||
|
OverrideDamageType = false
|
||||||
|
DamageType = 0
|
||||||
|
OverrideControllable = false
|
||||||
|
Controllable = false
|
||||||
|
OverrideCreationModifier = false
|
||||||
|
TimeModifiers = Array[ExtResource("3_fgjeq")]([])
|
||||||
WaitForCompletion = true
|
WaitForCompletion = true
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=30 format=3 uid="uid://bc054js8ep2b"]
|
[gd_scene load_steps=37 format=3 uid="uid://bc054js8ep2b"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c2mo5hc1qb6kf" path="res://Scripts/Components/Actors/Actor.cs" id="1_ugrra"]
|
[ext_resource type="Script" uid="uid://c2mo5hc1qb6kf" path="res://Scripts/Components/Actors/Actor.cs" id="1_ugrra"]
|
||||||
[ext_resource type="SpriteFrames" uid="uid://ch2ll1on8im2p" path="res://Resources/Sprites/FairyGuard.tres" id="2_i2plx"]
|
[ext_resource type="SpriteFrames" uid="uid://ch2ll1on8im2p" path="res://Resources/Sprites/FairyGuard.tres" id="2_i2plx"]
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
[ext_resource type="Resource" uid="uid://cdfmedtgp2rcn" path="res://Resources/Weapons/EnemyWeapon.tres" id="11_kuimj"]
|
[ext_resource type="Resource" uid="uid://cdfmedtgp2rcn" path="res://Resources/Weapons/EnemyWeapon.tres" id="11_kuimj"]
|
||||||
[ext_resource type="Script" uid="uid://2cijskgyt2xb" path="res://Scripts/Components/Actors/DamageReceiverActorModule.cs" id="12_fu5g7"]
|
[ext_resource type="Script" uid="uid://2cijskgyt2xb" path="res://Scripts/Components/Actors/DamageReceiverActorModule.cs" id="12_fu5g7"]
|
||||||
[ext_resource type="Script" uid="uid://m0ag88kn0c40" path="res://Scripts/Components/Actors/DeathAnimationHandler.cs" id="13_e2vvk"]
|
[ext_resource type="Script" uid="uid://m0ag88kn0c40" path="res://Scripts/Components/Actors/DeathAnimationHandler.cs" id="13_e2vvk"]
|
||||||
|
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="13_hwppe"]
|
||||||
[ext_resource type="Resource" uid="uid://dk2rbf88a5irh" path="res://Resources/Bullets/Explosion_Harmless.tres" id="14_881we"]
|
[ext_resource type="Resource" uid="uid://dk2rbf88a5irh" path="res://Resources/Bullets/Explosion_Harmless.tres" id="14_881we"]
|
||||||
[ext_resource type="Script" uid="uid://7g3luecewcp5" path="res://Scripts/Components/Actors/ActorDefeatScriptHandler.cs" id="15_17yce"]
|
[ext_resource type="Script" uid="uid://7g3luecewcp5" path="res://Scripts/Components/Actors/ActorDefeatScriptHandler.cs" id="15_17yce"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cm564ue740cpx" path="res://Scenes/Actors/DeadFairyGuard.tscn" id="15_gsthm"]
|
[ext_resource type="PackedScene" uid="uid://cm564ue740cpx" path="res://Scenes/Actors/DeadFairyGuard.tscn" id="15_gsthm"]
|
||||||
|
|
@ -29,6 +30,42 @@ radius = 5.0
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_sthwe"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_sthwe"]
|
||||||
radius = 85.0529
|
radius = 85.0529
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_swk2c"]
|
||||||
|
script = ExtResource("13_hwppe")
|
||||||
|
DamageType = 2
|
||||||
|
Attribute = 2
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_evv7k"]
|
||||||
|
script = ExtResource("13_hwppe")
|
||||||
|
DamageType = 3
|
||||||
|
Attribute = 2
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_y1chq"]
|
||||||
|
script = ExtResource("13_hwppe")
|
||||||
|
DamageType = 4
|
||||||
|
Attribute = 2
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_yrg2w"]
|
||||||
|
script = ExtResource("13_hwppe")
|
||||||
|
DamageType = 0
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_i6q2w"]
|
||||||
|
script = ExtResource("13_hwppe")
|
||||||
|
DamageType = 5
|
||||||
|
Attribute = 2
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ry6ip"]
|
||||||
|
script = ExtResource("13_hwppe")
|
||||||
|
DamageType = 1
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_0tkae"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_0tkae"]
|
||||||
radius = 5.09902
|
radius = 5.09902
|
||||||
|
|
||||||
|
|
@ -110,7 +147,7 @@ debug_path_custom_color = Color(1, 0, 0, 1)
|
||||||
[node name="HealthProvider" type="Node2D" parent="."]
|
[node name="HealthProvider" type="Node2D" parent="."]
|
||||||
script = ExtResource("9_fyr27")
|
script = ExtResource("9_fyr27")
|
||||||
ResourceName = "Health"
|
ResourceName = "Health"
|
||||||
MaxResource = 6.0
|
_maxResource = 3.0
|
||||||
|
|
||||||
[node name="EnemyWeapon" parent="." instance=ExtResource("10_yktta")]
|
[node name="EnemyWeapon" parent="." instance=ExtResource("10_yktta")]
|
||||||
WeaponData = ExtResource("11_kuimj")
|
WeaponData = ExtResource("11_kuimj")
|
||||||
|
|
@ -119,6 +156,7 @@ WeaponData = ExtResource("11_kuimj")
|
||||||
script = ExtResource("12_fu5g7")
|
script = ExtResource("12_fu5g7")
|
||||||
HealthProvider = NodePath("../HealthProvider")
|
HealthProvider = NodePath("../HealthProvider")
|
||||||
BulletGroup = 2
|
BulletGroup = 2
|
||||||
|
DamageResistances = Array[ExtResource("13_hwppe")]([SubResource("Resource_swk2c"), SubResource("Resource_evv7k"), SubResource("Resource_y1chq"), SubResource("Resource_yrg2w"), SubResource("Resource_i6q2w"), SubResource("Resource_ry6ip")])
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="DamageReceiver"]
|
[node name="Area2D" type="Area2D" parent="DamageReceiver"]
|
||||||
collision_layer = 16
|
collision_layer = 16
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ debug_path_custom_color = Color(1, 0, 0, 1)
|
||||||
[node name="HealthProvider" type="Node2D" parent="."]
|
[node name="HealthProvider" type="Node2D" parent="."]
|
||||||
script = ExtResource("9_4h871")
|
script = ExtResource("9_4h871")
|
||||||
ResourceName = "Health"
|
ResourceName = "Health"
|
||||||
MaxResource = 6.0
|
_maxResource = 2.0
|
||||||
|
|
||||||
[node name="EnemyWeapon" parent="." instance=ExtResource("10_nc74c")]
|
[node name="EnemyWeapon" parent="." instance=ExtResource("10_nc74c")]
|
||||||
WeaponData = ExtResource("11_y6dmo")
|
WeaponData = ExtResource("11_y6dmo")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=61 format=3 uid="uid://c4pr2707hbeph"]
|
[gd_scene load_steps=75 format=3 uid="uid://c4pr2707hbeph"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://d2ubk5gucny6s" path="res://Scripts/Components/FSM/PlayerFSMProxy.cs" id="1_g3wua"]
|
[ext_resource type="Script" uid="uid://d2ubk5gucny6s" path="res://Scripts/Components/FSM/PlayerFSMProxy.cs" id="1_g3wua"]
|
||||||
[ext_resource type="Script" uid="uid://bw2hakslndaxm" path="res://Scripts/Components/FSM/PlayerStateMachine.cs" id="1_mpmil"]
|
[ext_resource type="Script" uid="uid://bw2hakslndaxm" path="res://Scripts/Components/FSM/PlayerStateMachine.cs" id="1_mpmil"]
|
||||||
|
|
@ -28,6 +28,7 @@
|
||||||
[ext_resource type="Script" uid="uid://dv205x8msohpv" path="res://Scripts/Components/Actors/ActivationProvider.cs" id="22_12cwd"]
|
[ext_resource type="Script" uid="uid://dv205x8msohpv" path="res://Scripts/Components/Actors/ActivationProvider.cs" id="22_12cwd"]
|
||||||
[ext_resource type="PackedScene" uid="uid://chkpk7erlqajg" path="res://Scenes/Selector.tscn" id="23_5tmtw"]
|
[ext_resource type="PackedScene" uid="uid://chkpk7erlqajg" path="res://Scenes/Selector.tscn" id="23_5tmtw"]
|
||||||
[ext_resource type="AudioStream" uid="uid://myr6n2c1u503" path="res://SFX/581602__samsterbirdies__beep-error.mp3" id="24_5tmtw"]
|
[ext_resource type="AudioStream" uid="uid://myr6n2c1u503" path="res://SFX/581602__samsterbirdies__beep-error.mp3" id="24_5tmtw"]
|
||||||
|
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="25_12erk"]
|
||||||
[ext_resource type="Script" uid="uid://cem7a1agaqtrt" path="res://Scenes/InteractionController.cs" id="27_vwjki"]
|
[ext_resource type="Script" uid="uid://cem7a1agaqtrt" path="res://Scenes/InteractionController.cs" id="27_vwjki"]
|
||||||
[ext_resource type="Script" uid="uid://d0bebi2vn171l" path="res://Scripts/Components/FSM/Player/PlayerFSMItemUseModule.cs" id="29_m323t"]
|
[ext_resource type="Script" uid="uid://d0bebi2vn171l" path="res://Scripts/Components/FSM/Player/PlayerFSMItemUseModule.cs" id="29_m323t"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ddwhrlrgj6i00" path="res://Sprites/Actors/Cirno.png" id="30_li0ug"]
|
[ext_resource type="Texture2D" uid="uid://ddwhrlrgj6i00" path="res://Sprites/Actors/Cirno.png" id="30_li0ug"]
|
||||||
|
|
@ -106,6 +107,84 @@ animations = [{
|
||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_c4ide"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 0
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_fjg1v"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 1
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_hed00"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 2
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_q2flx"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 3
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_k7ckg"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 4
|
||||||
|
Attribute = 4
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_qlmfy"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 5
|
||||||
|
Attribute = 4
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_v2m0j"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 0
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_awrib"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 1
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_nfrn8"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 2
|
||||||
|
Attribute = 2
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_nfq4p"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 3
|
||||||
|
Attribute = 1
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_m1iep"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 0
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ckpe7"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 4
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_p5rkw"]
|
||||||
|
script = ExtResource("25_12erk")
|
||||||
|
DamageType = 5
|
||||||
|
Attribute = 0
|
||||||
|
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_igu66"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_igu66"]
|
||||||
radius = 2.23607
|
radius = 2.23607
|
||||||
|
|
||||||
|
|
@ -351,16 +430,18 @@ collision_mask = 392
|
||||||
script = ExtResource("14_igu66")
|
script = ExtResource("14_igu66")
|
||||||
_healthProvider = NodePath("HealthProvider")
|
_healthProvider = NodePath("HealthProvider")
|
||||||
_shieldProvider = NodePath("ShieldProvider")
|
_shieldProvider = NodePath("ShieldProvider")
|
||||||
|
ShieldDamageResistances = Array[ExtResource("25_12erk")]([SubResource("Resource_c4ide"), SubResource("Resource_fjg1v"), SubResource("Resource_hed00"), SubResource("Resource_q2flx"), SubResource("Resource_k7ckg"), SubResource("Resource_qlmfy")])
|
||||||
|
HealthDamageResistances = Array[ExtResource("25_12erk")]([SubResource("Resource_v2m0j"), SubResource("Resource_awrib"), SubResource("Resource_nfrn8"), SubResource("Resource_nfq4p"), SubResource("Resource_m1iep"), SubResource("Resource_ckpe7"), SubResource("Resource_p5rkw")])
|
||||||
|
|
||||||
[node name="HealthProvider" type="Node2D" parent="DamageReceiver"]
|
[node name="HealthProvider" type="Node2D" parent="DamageReceiver"]
|
||||||
script = ExtResource("15_5qlss")
|
script = ExtResource("15_5qlss")
|
||||||
ResourceName = "Health"
|
ResourceName = "Health"
|
||||||
MaxResource = 32.0
|
_maxResource = 32.0
|
||||||
|
|
||||||
[node name="ShieldProvider" type="Node2D" parent="DamageReceiver"]
|
[node name="ShieldProvider" type="Node2D" parent="DamageReceiver"]
|
||||||
script = ExtResource("15_5qlss")
|
script = ExtResource("15_5qlss")
|
||||||
ResourceName = "Shield"
|
ResourceName = "Shield"
|
||||||
MaxResource = 32.0
|
_maxResource = 32.0
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageReceiver"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageReceiver"]
|
||||||
shape = SubResource("CircleShape2D_igu66")
|
shape = SubResource("CircleShape2D_igu66")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=29 format=3 uid="uid://dkwi1hu1bixoe"]
|
[gd_scene load_steps=33 format=3 uid="uid://dkwi1hu1bixoe"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://baf6pxbvhqmjk" path="res://Scripts/Hud.cs" id="1_m0hb0"]
|
[ext_resource type="Script" uid="uid://baf6pxbvhqmjk" path="res://Scripts/Hud.cs" id="1_m0hb0"]
|
||||||
[ext_resource type="FontFile" uid="uid://ccm3u37q1hvux" path="res://fonts/Xolonium-Regular.ttf" id="2_0xmx2"]
|
[ext_resource type="FontFile" uid="uid://ccm3u37q1hvux" path="res://fonts/Xolonium-Regular.ttf" id="2_0xmx2"]
|
||||||
|
|
@ -19,7 +19,11 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://cihsd5rw8i5xm" path="res://Sprites/UI/ShieldBar_Foreground.png" id="13_j6myr"]
|
[ext_resource type="Texture2D" uid="uid://cihsd5rw8i5xm" path="res://Sprites/UI/ShieldBar_Foreground.png" id="13_j6myr"]
|
||||||
[ext_resource type="StyleBox" uid="uid://24hh6h4juk3r" path="res://Resources/Styles/PixelStyleBoxRed_SquareBackground.tres" id="13_sjdna"]
|
[ext_resource type="StyleBox" uid="uid://24hh6h4juk3r" path="res://Resources/Styles/PixelStyleBoxRed_SquareBackground.tres" id="13_sjdna"]
|
||||||
[ext_resource type="Script" uid="uid://cwd3sksjqpuy3" path="res://Scripts/Utils/FpsCounterLabel.cs" id="15_x61tu"]
|
[ext_resource type="Script" uid="uid://cwd3sksjqpuy3" path="res://Scripts/Utils/FpsCounterLabel.cs" id="15_x61tu"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://duwiasewxvcb5" path="res://Sprites/Items/Icicle_Gun.png" id="19_h6xwv"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c8fr1ea20odaw" path="res://Sprites/Items/Heart_Extend.png" id="19_j6myr"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cid62phhew3ep" path="res://Sprites/UI/StatusSprite02.png" id="19_n0pka"]
|
[ext_resource type="Texture2D" uid="uid://cid62phhew3ep" path="res://Sprites/UI/StatusSprite02.png" id="19_n0pka"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://8n23xie4kore" path="res://Sprites/Items/Shield_Pickup.png" id="22_5cvcb"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cvc0x4bbnhusw" path="res://Sprites/Items/Ice_Crystal_Shield.png" id="22_jefn6"]
|
||||||
|
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_a7f6n"]
|
[sub_resource type="LabelSettings" id="LabelSettings_a7f6n"]
|
||||||
font = ExtResource("2_0xmx2")
|
font = ExtResource("2_0xmx2")
|
||||||
|
|
@ -271,53 +275,74 @@ theme = ExtResource("9_sx5r0")
|
||||||
theme_override_styles/panel = ExtResource("13_sjdna")
|
theme_override_styles/panel = ExtResource("13_sjdna")
|
||||||
metadata/_tab_index = 4
|
metadata/_tab_index = 4
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="InventoryMenu/Status"]
|
[node name="MarginContainer" type="MarginContainer" parent="InventoryMenu/Status"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 32
|
||||||
|
theme_override_constants/margin_right = 32
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="InventoryMenu/Status/MarginContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="VBoxContainer2" type="VBoxContainer" parent="InventoryMenu/Status/HBoxContainer"]
|
[node name="VBoxContainer2" type="VBoxContainer" parent="InventoryMenu/Status/MarginContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="Button" type="Button" parent="InventoryMenu/Status/HBoxContainer/VBoxContainer2"]
|
[node name="Button" type="Button" parent="InventoryMenu/Status/MarginContainer/HBoxContainer/VBoxContainer2"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "9 Gun"
|
text = "IC-9
|
||||||
|
"
|
||||||
|
icon = ExtResource("19_h6xwv")
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="InventoryMenu/Status/HBoxContainer"]
|
[node name="VBoxContainer3" type="VBoxContainer" parent="InventoryMenu/Status/MarginContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 10
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="Shield" type="Button" parent="InventoryMenu/Status/MarginContainer/HBoxContainer/VBoxContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/line_spacing = -4
|
||||||
|
text = "Ice
|
||||||
|
Crystal"
|
||||||
|
icon = ExtResource("22_jefn6")
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="InventoryMenu/Status/MarginContainer/HBoxContainer/VBoxContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HealthExtensions" type="Button" parent="InventoryMenu/Status/MarginContainer/HBoxContainer/VBoxContainer3/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "x2"
|
||||||
|
icon = ExtResource("19_j6myr")
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
|
[node name="ShieldExtensions" type="Button" parent="InventoryMenu/Status/MarginContainer/HBoxContainer/VBoxContainer3/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "x1"
|
||||||
|
icon = ExtResource("22_5cvcb")
|
||||||
|
alignment = 0
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="InventoryMenu/Status"]
|
||||||
custom_minimum_size = Vector2(96, 0)
|
custom_minimum_size = Vector2(96, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="InventoryMenu/Status/HBoxContainer/VBoxContainer"]
|
[node name="Label" type="Label" parent="InventoryMenu/Status/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
text = "Cirno"
|
text = "CIRNO"
|
||||||
label_settings = SubResource("LabelSettings_bkqle")
|
label_settings = SubResource("LabelSettings_bkqle")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="InventoryMenu/Status/HBoxContainer/VBoxContainer"]
|
[node name="TextureRect" type="TextureRect" parent="InventoryMenu/Status/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
texture = ExtResource("19_n0pka")
|
texture = ExtResource("19_n0pka")
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 3
|
stretch_mode = 3
|
||||||
|
|
||||||
[node name="VBoxContainer3" type="VBoxContainer" parent="InventoryMenu/Status/HBoxContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 0
|
|
||||||
alignment = 1
|
|
||||||
|
|
||||||
[node name="Button" type="Button" parent="InventoryMenu/Status/HBoxContainer/VBoxContainer3"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Plasma
|
|
||||||
Shield"
|
|
||||||
|
|
||||||
[node name="Button2" type="Button" parent="InventoryMenu/Status/HBoxContainer/VBoxContainer3"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Fission
|
|
||||||
Battery"
|
|
||||||
|
|
||||||
[node name="FPS" type="Label" parent="."]
|
[node name="FPS" type="Label" parent="."]
|
||||||
z_index = 10
|
z_index = 10
|
||||||
z_as_relative = false
|
z_as_relative = false
|
||||||
|
|
|
||||||
240
Scenes/Items/Heart_Extend_Pickup.tscn
Normal file
240
Scenes/Items/Heart_Extend_Pickup.tscn
Normal file
|
|
@ -0,0 +1,240 @@
|
||||||
|
[gd_scene load_steps=37 format=3 uid="uid://1yxieu8ekvkm"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://b3h7b30kerf60" path="res://Scripts/Interactables/ItemPickup.cs" id="1_clwuw"]
|
||||||
|
[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="2_7y15p"]
|
||||||
|
[ext_resource type="Resource" uid="uid://ciybnocjfpshh" path="res://Resources/Items/Heart_Extend_Pickup.tres" id="3_clwuw"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c6gjpfxrux5uq" path="res://Sprites/Items/Heart_Extend_Animated.png" id="4_clwuw"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_6vv2s"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_7y15p"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(0, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_waemn"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(16, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_bjk88"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(32, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_8jwq6"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(48, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_eig3j"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(64, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_dteyd"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(80, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2leii"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(96, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2awkr"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(112, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_aprjp"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(128, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qx72f"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(144, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_h8grk"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(160, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_jnr3s"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(176, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_d28db"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(192, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_u7ynh"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(208, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_l55kd"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(224, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_yt5rm"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(240, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fdiqt"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(256, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_xfnff"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(272, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fi0kx"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(288, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_87c7p"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(304, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_t5ypa"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(320, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_l1iqv"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(336, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_cocif"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(352, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_wqdik"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(368, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_cpebw"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(384, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_i0u2d"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(400, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_a7mmg"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(416, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_upnwy"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(432, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_y4lyn"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(448, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_xu2op"]
|
||||||
|
atlas = ExtResource("4_clwuw")
|
||||||
|
region = Rect2(464, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_b00e1"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_7y15p")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_waemn")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_bjk88")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_8jwq6")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_eig3j")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_dteyd")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_2leii")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_2awkr")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_aprjp")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_qx72f")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_h8grk")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_jnr3s")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_d28db")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_u7ynh")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_l55kd")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_yt5rm")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_fdiqt")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_xfnff")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_fi0kx")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_87c7p")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_t5ypa")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_l1iqv")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_cocif")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_wqdik")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_cpebw")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_i0u2d")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_a7mmg")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_upnwy")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_y4lyn")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_xu2op")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"default",
|
||||||
|
"speed": 5.0
|
||||||
|
}]
|
||||||
|
|
||||||
|
[node name="HeartExtendPickup" type="Area2D" groups=["Interactable"]]
|
||||||
|
collision_layer = 4
|
||||||
|
collision_mask = 2
|
||||||
|
script = ExtResource("1_clwuw")
|
||||||
|
LootTable = Array[ExtResource("2_7y15p")]([ExtResource("3_clwuw")])
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource("CircleShape2D_6vv2s")
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
|
sprite_frames = SubResource("SpriteFrames_b00e1")
|
||||||
|
autoplay = "default"
|
||||||
|
frame_progress = 0.465593
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=71 format=4 uid="uid://dqyfnby0t7gu1"]
|
[gd_scene load_steps=72 format=4 uid="uid://dqyfnby0t7gu1"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_c3v4x"]
|
[ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_c3v4x"]
|
||||||
[ext_resource type="Resource" uid="uid://cs3ihltcn2166" path="res://Resources/Items/IcicleGun.tres" id="3_6314l"]
|
[ext_resource type="Resource" uid="uid://cs3ihltcn2166" path="res://Resources/Items/IcicleGun.tres" id="3_6314l"]
|
||||||
|
|
@ -53,6 +53,7 @@
|
||||||
[ext_resource type="Script" uid="uid://c1gu44a1kkmt1" path="res://Scripts/Actors/ScriptableBulletsEmitter.cs" id="38_m2f1m"]
|
[ext_resource type="Script" uid="uid://c1gu44a1kkmt1" path="res://Scripts/Actors/ScriptableBulletsEmitter.cs" id="38_m2f1m"]
|
||||||
[ext_resource type="Script" uid="uid://bngko08ho85p6" path="res://Scripts/Resources/BulletScript.cs" id="39_83jc5"]
|
[ext_resource type="Script" uid="uid://bngko08ho85p6" path="res://Scripts/Resources/BulletScript.cs" id="39_83jc5"]
|
||||||
[ext_resource type="Resource" uid="uid://dqnvesdj0dk3v" path="res://Resources/Bullets/simple_enemy_bullet.tres" id="39_b0wyy"]
|
[ext_resource type="Resource" uid="uid://dqnvesdj0dk3v" path="res://Resources/Bullets/simple_enemy_bullet.tres" id="39_b0wyy"]
|
||||||
|
[ext_resource type="Script" uid="uid://b5s5mjuk1rng5" path="res://Scripts/Resources/TimeModifier.cs" id="40_4mkc6"]
|
||||||
[ext_resource type="Script" uid="uid://c0ndqalsc4jve" path="res://Scripts/AttackPatterns/SpiralPattern.cs" id="40_o56je"]
|
[ext_resource type="Script" uid="uid://c0ndqalsc4jve" path="res://Scripts/AttackPatterns/SpiralPattern.cs" id="40_o56je"]
|
||||||
[ext_resource type="Script" uid="uid://c6467d6yx50qh" path="res://Scripts/Components/BulletSpawner.cs" id="43_b8ffn"]
|
[ext_resource type="Script" uid="uid://c6467d6yx50qh" path="res://Scripts/Components/BulletSpawner.cs" id="43_b8ffn"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b7gkxlll3b1eg" path="res://Scenes/Activable/FloorEmitter.tscn" id="44_b8ffn"]
|
[ext_resource type="PackedScene" uid="uid://b7gkxlll3b1eg" path="res://Scenes/Activable/FloorEmitter.tscn" id="44_b8ffn"]
|
||||||
|
|
@ -96,6 +97,14 @@ burstInterval = 0.5
|
||||||
ShotsPerBurst = 100
|
ShotsPerBurst = 100
|
||||||
BurstRate = 0.0
|
BurstRate = 0.0
|
||||||
_targetPlayer = false
|
_targetPlayer = false
|
||||||
|
OverrideOwner = false
|
||||||
|
Owner = 0
|
||||||
|
OverrideDamageType = false
|
||||||
|
DamageType = 0
|
||||||
|
OverrideControllable = false
|
||||||
|
Controllable = false
|
||||||
|
OverrideCreationModifier = false
|
||||||
|
TimeModifiers = Array[ExtResource("40_4mkc6")]([])
|
||||||
WaitForCompletion = true
|
WaitForCompletion = true
|
||||||
metadata/_custom_type_script = "uid://c0ndqalsc4jve"
|
metadata/_custom_type_script = "uid://c0ndqalsc4jve"
|
||||||
|
|
||||||
|
|
@ -116,10 +125,18 @@ burstInterval = 0.5
|
||||||
ShotsPerBurst = 100
|
ShotsPerBurst = 100
|
||||||
BurstRate = 0.0
|
BurstRate = 0.0
|
||||||
_targetPlayer = false
|
_targetPlayer = false
|
||||||
|
OverrideOwner = false
|
||||||
|
Owner = 0
|
||||||
|
OverrideDamageType = false
|
||||||
|
DamageType = 0
|
||||||
|
OverrideControllable = false
|
||||||
|
Controllable = false
|
||||||
|
OverrideCreationModifier = false
|
||||||
|
TimeModifiers = Array[ExtResource("40_4mkc6")]([])
|
||||||
WaitForCompletion = true
|
WaitForCompletion = true
|
||||||
metadata/_custom_type_script = "uid://c0ndqalsc4jve"
|
metadata/_custom_type_script = "uid://c0ndqalsc4jve"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_b8ffn"]
|
[sub_resource type="Resource" id="Resource_64bae"]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
script = ExtResource("39_83jc5")
|
script = ExtResource("39_83jc5")
|
||||||
Patterns = Array[Object]([SubResource("Resource_kuo18")])
|
Patterns = Array[Object]([SubResource("Resource_kuo18")])
|
||||||
|
|
@ -356,7 +373,7 @@ EmitOnStart = true
|
||||||
|
|
||||||
[node name="FloorEmitter2" parent="Tilemaps/Actors" instance=ExtResource("44_b8ffn")]
|
[node name="FloorEmitter2" parent="Tilemaps/Actors" instance=ExtResource("44_b8ffn")]
|
||||||
position = Vector2(601, 147)
|
position = Vector2(601, 147)
|
||||||
Script = SubResource("Resource_b8ffn")
|
Script = SubResource("Resource_64bae")
|
||||||
InvertSignal = true
|
InvertSignal = true
|
||||||
EmitOnStart = true
|
EmitOnStart = true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=132 format=4 uid="uid://bv451a8wgty4u"]
|
[gd_scene load_steps=134 format=4 uid="uid://bv451a8wgty4u"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
|
[ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c4pr2707hbeph" path="res://Scenes/Actors/fsm_player.tscn" id="2_ksslq"]
|
[ext_resource type="PackedScene" uid="uid://c4pr2707hbeph" path="res://Scenes/Actors/fsm_player.tscn" id="2_ksslq"]
|
||||||
|
|
@ -103,9 +103,11 @@
|
||||||
[ext_resource type="Resource" uid="uid://cmra7n6so1x4u" path="res://Resources/BulletScripts/Basic_Enemy_Emitter_Spiral_Bullets.tres" id="95_7m6n7"]
|
[ext_resource type="Resource" uid="uid://cmra7n6so1x4u" path="res://Resources/BulletScripts/Basic_Enemy_Emitter_Spiral_Bullets.tres" id="95_7m6n7"]
|
||||||
[ext_resource type="Resource" uid="uid://dodwpect0ldjf" path="res://Resources/Items/Heart_Pickup.tres" id="95_srv0g"]
|
[ext_resource type="Resource" uid="uid://dodwpect0ldjf" path="res://Resources/Items/Heart_Pickup.tres" id="95_srv0g"]
|
||||||
[ext_resource type="PackedScene" uid="uid://nupd3pg74vua" path="res://Scenes/Activable/ScriptableInvisibleEmitter.tscn" id="96_ygp23"]
|
[ext_resource type="PackedScene" uid="uid://nupd3pg74vua" path="res://Scenes/Activable/ScriptableInvisibleEmitter.tscn" id="96_ygp23"]
|
||||||
|
[ext_resource type="Script" uid="uid://b5s5mjuk1rng5" path="res://Scripts/Resources/TimeModifier.cs" id="97_gvbi8"]
|
||||||
[ext_resource type="Resource" uid="uid://dtkti2rjlcp3u" path="res://Resources/Bullets/Fire_Emitter_Bullet.tres" id="97_xwjvv"]
|
[ext_resource type="Resource" uid="uid://dtkti2rjlcp3u" path="res://Resources/Bullets/Fire_Emitter_Bullet.tres" id="97_xwjvv"]
|
||||||
[ext_resource type="Script" uid="uid://c0ndqalsc4jve" path="res://Scripts/AttackPatterns/SpiralPattern.cs" id="98_gvbi8"]
|
[ext_resource type="Script" uid="uid://c0ndqalsc4jve" path="res://Scripts/AttackPatterns/SpiralPattern.cs" id="98_gvbi8"]
|
||||||
[ext_resource type="Script" uid="uid://bngko08ho85p6" path="res://Scripts/Resources/BulletScript.cs" id="99_j6vrf"]
|
[ext_resource type="Script" uid="uid://bngko08ho85p6" path="res://Scripts/Resources/BulletScript.cs" id="99_j6vrf"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://1yxieu8ekvkm" path="res://Scenes/Items/Heart_Extend_Pickup.tscn" id="99_xwjvv"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_6sau4"]
|
[sub_resource type="Resource" id="Resource_6sau4"]
|
||||||
script = ExtResource("7_l32kg")
|
script = ExtResource("7_l32kg")
|
||||||
|
|
@ -214,7 +216,7 @@ ActivationType = 0
|
||||||
Targets = Array[NodePath]([NodePath("../Rumia")])
|
Targets = Array[NodePath]([NodePath("../Rumia")])
|
||||||
WaitForCompletion = true
|
WaitForCompletion = true
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ygp23"]
|
[sub_resource type="Resource" id="Resource_j6vrf"]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
script = ExtResource("49_0si7g")
|
script = ExtResource("49_0si7g")
|
||||||
Target = NodePath(".")
|
Target = NodePath(".")
|
||||||
|
|
@ -241,6 +243,14 @@ burstInterval = 0.5
|
||||||
ShotsPerBurst = 100
|
ShotsPerBurst = 100
|
||||||
BurstRate = 0.0
|
BurstRate = 0.0
|
||||||
_targetPlayer = false
|
_targetPlayer = false
|
||||||
|
OverrideOwner = false
|
||||||
|
Owner = 0
|
||||||
|
OverrideDamageType = false
|
||||||
|
DamageType = 0
|
||||||
|
OverrideControllable = false
|
||||||
|
Controllable = false
|
||||||
|
OverrideCreationModifier = false
|
||||||
|
TimeModifiers = Array[ExtResource("97_gvbi8")]([])
|
||||||
WaitForCompletion = true
|
WaitForCompletion = true
|
||||||
metadata/_custom_type_script = "uid://c0ndqalsc4jve"
|
metadata/_custom_type_script = "uid://c0ndqalsc4jve"
|
||||||
|
|
||||||
|
|
@ -575,7 +585,7 @@ IsEnabled = true
|
||||||
Target = NodePath("../DebugTeleporter")
|
Target = NodePath("../DebugTeleporter")
|
||||||
|
|
||||||
[node name="DebugTeleporter" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("30_8fdby")]
|
[node name="DebugTeleporter" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("30_8fdby")]
|
||||||
position = Vector2(-1078, -97)
|
position = Vector2(-434, 101)
|
||||||
Invisible = true
|
Invisible = true
|
||||||
metadata/_edit_group_ = true
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
|
@ -865,7 +875,7 @@ Events = Array[ExtResource("44_mah4x")]([SubResource("Resource_068l7"), SubResou
|
||||||
|
|
||||||
[node name="BossBattleStartScript" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("43_kf3qc")]
|
[node name="BossBattleStartScript" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("43_kf3qc")]
|
||||||
position = Vector2(-1487, -396)
|
position = Vector2(-1487, -396)
|
||||||
Events = Array[ExtResource("44_mah4x")]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_ygp23")])
|
Events = Array[ExtResource("44_mah4x")]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_j6vrf")])
|
||||||
|
|
||||||
[node name="Enemy13" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("47_u1ve6")]
|
[node name="Enemy13" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("47_u1ve6")]
|
||||||
position = Vector2(-1657, -788)
|
position = Vector2(-1657, -788)
|
||||||
|
|
@ -1175,7 +1185,6 @@ InvertSignal = true
|
||||||
position = Vector2(-722, 56)
|
position = Vector2(-722, 56)
|
||||||
rotation = -1.5708
|
rotation = -1.5708
|
||||||
Script = SubResource("Resource_f37sa")
|
Script = SubResource("Resource_f37sa")
|
||||||
InvertSignal = true
|
|
||||||
|
|
||||||
[node name="InvisibleBulletEmitter2" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("96_ygp23")]
|
[node name="InvisibleBulletEmitter2" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("96_ygp23")]
|
||||||
position = Vector2(-1492, -168)
|
position = Vector2(-1492, -168)
|
||||||
|
|
@ -1183,6 +1192,12 @@ rotation = -1.5708
|
||||||
Script = SubResource("Resource_f37sa")
|
Script = SubResource("Resource_f37sa")
|
||||||
EmitOnStart = true
|
EmitOnStart = true
|
||||||
|
|
||||||
|
[node name="HeartExtendPickup" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("99_xwjvv")]
|
||||||
|
position = Vector2(-386, 84)
|
||||||
|
|
||||||
|
[node name="HeartExtendPickup2" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("99_xwjvv")]
|
||||||
|
position = Vector2(-712, -393)
|
||||||
|
|
||||||
[node name="PlayerParent" type="Node2D" parent="Parallax2D/Factory Tilemaps"]
|
[node name="PlayerParent" type="Node2D" parent="Parallax2D/Factory Tilemaps"]
|
||||||
|
|
||||||
[node name="BeamShadows" type="TileMapLayer" parent="Parallax2D/Factory Tilemaps"]
|
[node name="BeamShadows" type="TileMapLayer" parent="Parallax2D/Factory Tilemaps"]
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,9 @@ public partial class LaserPattern : SpiralPattern
|
||||||
[ExportGroup("Laser")][Export] public Color PreFireColor { get; set; } = new Color(1, 0, 0, 0.5f); // Thin red beam
|
[ExportGroup("Laser")][Export] public Color PreFireColor { get; set; } = new Color(1, 0, 0, 0.5f); // Thin red beam
|
||||||
[ExportGroup("Laser")][Export] public Color LethalColor { get; set; } = new Color(1, 0, 0, 1.0f); // Thicker beam
|
[ExportGroup("Laser")][Export] public Color LethalColor { get; set; } = new Color(1, 0, 0, 1.0f); // Thicker beam
|
||||||
|
|
||||||
protected override BulletInfo MakeBullet(Vector2 position, Vector2 direction, float angleOffset)
|
protected override BulletInfo MakeBullet(Vector2 position, int count = 1, float spread = 0f, float rotationOffset = 0f)
|
||||||
{
|
{
|
||||||
var bf = base.MakeBullet(position, direction, angleOffset);
|
var bf = base.MakeBullet(position, count, spread, rotationOffset);
|
||||||
|
|
||||||
bf.IsLaser = true;
|
bf.IsLaser = true;
|
||||||
bf.PreFireTime = PreFireTime;
|
bf.PreFireTime = PreFireTime;
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,55 @@ public partial class SpiralPattern : AttackPattern
|
||||||
// [ExportGroup("Modifiers")] [Export] private Array<TimeModifier> _timeModifiers;
|
// [ExportGroup("Modifiers")] [Export] private Array<TimeModifier> _timeModifiers;
|
||||||
[ExportCategory("Other")] [Export] public bool _targetPlayer = false;
|
[ExportCategory("Other")] [Export] public bool _targetPlayer = false;
|
||||||
|
|
||||||
protected virtual BulletInfo MakeBullet(Vector2 position, Vector2 direction, float angleOffset)
|
[ExportCategory("Overrides")]
|
||||||
{
|
[Export] public bool OverrideOwner { get; private set; } = false;
|
||||||
var bl = BulletResource.MakeBullet(position, bulletCount, angleOffset);
|
[Export] public BulletOwner Owner { get; private set; } = BulletOwner.None;
|
||||||
bl.Direction = direction;
|
[Export] public bool OverrideDamageType { get; private set; } = false;
|
||||||
|
[Export] public DamageType DamageType { get; private set; } = DamageType.Neutral;
|
||||||
|
[Export] public bool OverrideControllable { get; private set; } = false;
|
||||||
|
[Export] public bool Controllable { get; private set; } = false;
|
||||||
|
|
||||||
return bl;
|
[ExportCategory("Extra Modifiers")]
|
||||||
|
[Export]
|
||||||
|
public bool OverrideCreationModifier { get; private set; } = false;
|
||||||
|
|
||||||
|
[Export] public BulletCreationModifier Modifier;
|
||||||
|
[Export] public Array<TimeModifier> TimeModifiers = [];
|
||||||
|
|
||||||
|
protected virtual BulletInfo MakeBullet(Vector2 position, int count = 1, float spread = 0f, float rotationOffset = 0f)
|
||||||
|
{
|
||||||
|
var bullet = this.BulletResource.MakeBullet(position, count,
|
||||||
|
spread, rotationOffset);
|
||||||
|
|
||||||
|
if (OverrideOwner)
|
||||||
|
{
|
||||||
|
bullet.Owner = this.Owner;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OverrideDamageType)
|
||||||
|
{
|
||||||
|
bullet.DamageType = DamageType;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OverrideControllable)
|
||||||
|
{
|
||||||
|
bullet.Controllabe = Controllable;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OverrideCreationModifier)
|
||||||
|
{
|
||||||
|
bullet.Modifier = this.Modifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TimeModifiers.Count != 0)
|
||||||
|
{
|
||||||
|
bullet.TimeModifiers.AddRange(TimeModifiers);
|
||||||
|
}
|
||||||
|
|
||||||
|
//var bl = BulletResource.MakeBullet(position, bulletCount, angleOffset);
|
||||||
|
//bl.Direction = direction;
|
||||||
|
|
||||||
|
return bullet;
|
||||||
|
|
||||||
// return new BulletInfo()
|
// return new BulletInfo()
|
||||||
// {
|
// {
|
||||||
|
|
@ -184,8 +227,9 @@ public partial class SpiralPattern : AttackPattern
|
||||||
direction = (GameManager.Instance.PlayerPosition.Value - Parent.GlobalPosition).Normalized();
|
direction = (GameManager.Instance.PlayerPosition.Value - Parent.GlobalPosition).Normalized();
|
||||||
}
|
}
|
||||||
|
|
||||||
var bullet = pattern.BulletResource.MakeBullet(Parent.GlobalPosition, pattern.bulletCount,
|
var bullet = pattern.MakeBullet(Parent.GlobalPosition, pattern.bulletCount,
|
||||||
pattern.spread, angleOffset);
|
pattern.spread, angleOffset);
|
||||||
|
|
||||||
bullet.Direction = direction;
|
bullet.Direction = direction;
|
||||||
|
|
||||||
//spawner.SpawnBullet(MakeBullet(Boss.GlobalPosition, direction, angleOffset));
|
//spawner.SpawnBullet(MakeBullet(Boss.GlobalPosition, direction, angleOffset));
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,33 @@ public partial class ActorResourceProvider : Node2D
|
||||||
[Export]
|
[Export]
|
||||||
public string ResourceName { get; private set; }
|
public string ResourceName { get; private set; }
|
||||||
|
|
||||||
[Export]
|
public float MaxResource
|
||||||
public float MaxResource { get; set; } = 10f;
|
{
|
||||||
|
get => _maxResource;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_maxResource == value) return;
|
||||||
|
|
||||||
|
if (value > _currentResource)
|
||||||
|
{
|
||||||
|
EmitSignal(SignalName.ResourceIncreased, _currentResource, _currentResource, value);
|
||||||
|
}
|
||||||
|
else if (value < _currentResource)
|
||||||
|
{
|
||||||
|
EmitSignal(SignalName.ResourceDecreased, _currentResource, _currentResource, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
_maxResource = value;
|
||||||
|
|
||||||
|
EmitSignal(SignalName.ResourceChanged, _currentResource, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private float _currentResource = 0f;
|
private float _currentResource = 0f;
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
private float _maxResource = 10f;
|
||||||
|
|
||||||
[Signal]
|
[Signal]
|
||||||
public delegate void ResourceChangedEventHandler(float newValue, float maxValue);
|
public delegate void ResourceChangedEventHandler(float newValue, float maxValue);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using Cirno.Scripts.Components.FSM;
|
using Cirno.Scripts.Components.FSM;
|
||||||
|
using Cirno.Scripts.Enums;
|
||||||
|
using Cirno.Scripts.Resources;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Godot.Collections;
|
||||||
|
|
||||||
namespace Cirno.Scripts.Components.Actors;
|
namespace Cirno.Scripts.Components.Actors;
|
||||||
|
|
||||||
|
|
@ -12,13 +16,28 @@ public partial class PlayerDamageReceiver : Area2D
|
||||||
public bool Invulnerable { get; private set; } = false;
|
public bool Invulnerable { get; private set; } = false;
|
||||||
[Export] public BulletOwner BulletGroup { get; set; } = BulletOwner.Player;
|
[Export] public BulletOwner BulletGroup { get; set; } = BulletOwner.Player;
|
||||||
|
|
||||||
|
[ExportCategory("Extensions")]
|
||||||
|
[Export] public StringName HealthExtendName { get; private set; } = "HEALTH_EXTEND";
|
||||||
|
[Export] public StringName ShieldExtendName { get; private set; } = "SHIELD_EXTEND";
|
||||||
|
|
||||||
|
[Export] public float BaseHealth { get; private set; } = 32f;
|
||||||
|
[Export] public float BaseShield { get; private set; } = 32f;
|
||||||
|
|
||||||
|
[Export] public float HealthExtendAmount { get; private set; } = 4f;
|
||||||
|
[Export] public float ShieldExtendAmount { get; private set; } = 4f;
|
||||||
|
|
||||||
|
[ExportCategory("Providers")]
|
||||||
[Export]
|
[Export]
|
||||||
private ActorResourceProvider _healthProvider;
|
private ActorResourceProvider _healthProvider;
|
||||||
[Export]
|
[Export]
|
||||||
private ActorResourceProvider _shieldProvider;
|
private ActorResourceProvider _shieldProvider;
|
||||||
|
|
||||||
|
[ExportCategory("Damage Types")]
|
||||||
[Export] public StringName AcidGroupName { get; private set; } = "Acid";
|
[Export] public StringName AcidGroupName { get; private set; } = "Acid";
|
||||||
|
|
||||||
|
[Export] public Array<DamageResistance> ShieldDamageResistances { get; set; } = [];
|
||||||
|
[Export] public Array<DamageResistance> HealthDamageResistances { get; set; } = [];
|
||||||
|
|
||||||
[Signal]
|
[Signal]
|
||||||
public delegate void HealthChangedEventHandler(float newValue, float maxValue);
|
public delegate void HealthChangedEventHandler(float newValue, float maxValue);
|
||||||
[Signal]
|
[Signal]
|
||||||
|
|
@ -81,6 +100,27 @@ public partial class PlayerDamageReceiver : Area2D
|
||||||
//if (!Enabled) return;
|
//if (!Enabled) return;
|
||||||
EmitSignal(SignalName.Death);
|
EmitSignal(SignalName.Death);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Set max resources based on inventory
|
||||||
|
SetMaxResources();
|
||||||
|
|
||||||
|
InventoryManager.Instance.ItemAdded += (item, amount) =>
|
||||||
|
{
|
||||||
|
if (item.ItemKey != HealthExtendName && item.ItemKey != ShieldExtendName) return;
|
||||||
|
|
||||||
|
SetMaxResources();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetMaxResources()
|
||||||
|
{
|
||||||
|
var healthExtends = InventoryManager.Instance.GetItemCount(HealthExtendName);
|
||||||
|
|
||||||
|
var shieldExtends = InventoryManager.Instance.GetItemCount(ShieldExtendName);
|
||||||
|
|
||||||
|
_healthProvider.MaxResource = BaseHealth + (healthExtends * HealthExtendAmount);
|
||||||
|
|
||||||
|
_shieldProvider.MaxResource = BaseShield + (shieldExtends * ShieldExtendAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RefillHealth()
|
public void RefillHealth()
|
||||||
|
|
@ -116,10 +156,42 @@ public partial class PlayerDamageReceiver : Area2D
|
||||||
//_healthProvider.CurrentResource = 0;
|
//_healthProvider.CurrentResource = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ApplyDamageToHealth(float damage, DamageType type = DamageType.Neutral)
|
||||||
|
{
|
||||||
|
if (HealthDamageResistances.Where(x => x.DamageType == type)
|
||||||
|
.Any(x => x.Attribute is DamageAttribute.Skip)) return;
|
||||||
|
|
||||||
|
var dmg = HealthDamageResistances.Aggregate(damage, (current, resistance) => current * resistance.CalculateDamage(current, type));
|
||||||
|
|
||||||
|
CurrentHealth -= dmg;
|
||||||
|
}
|
||||||
public void Hit(float damage, DamageType type = DamageType.Neutral)
|
public void Hit(float damage, DamageType type = DamageType.Neutral)
|
||||||
{
|
{
|
||||||
if (!Enabled) return;
|
if (!Enabled) return;
|
||||||
|
|
||||||
|
// Check if the shield is empty or damage has skip attributes
|
||||||
|
if (CurrentShield <= 0 || ShieldDamageResistances.Where(x => x.DamageType == type).Any(x => x.Attribute is DamageAttribute.Skip))
|
||||||
|
{
|
||||||
|
// do not apply, go to health
|
||||||
|
ApplyDamageToHealth(damage, type);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var shieldDmg = ShieldDamageResistances.Aggregate(damage, (current, resistance) => current * resistance.CalculateDamage(current, type));
|
||||||
|
|
||||||
|
// apply and get remainder
|
||||||
|
var remainder = CurrentShield - shieldDmg;
|
||||||
|
CurrentShield = remainder; // Let the resource's self-balancing take care of any remainders
|
||||||
|
|
||||||
|
if (remainder < 0)
|
||||||
|
{
|
||||||
|
// Apply remainder to health
|
||||||
|
ApplyDamageToHealth(-remainder, type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
if (CurrentShield > 0 && type is not DamageType.Explosive or DamageType.Acid)
|
if (CurrentShield > 0 && type is not DamageType.Explosive or DamageType.Acid)
|
||||||
{
|
{
|
||||||
// Reduce shield
|
// Reduce shield
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,5 @@ public enum DamageAttribute
|
||||||
Resist,
|
Resist,
|
||||||
Weak,
|
Weak,
|
||||||
Immune,
|
Immune,
|
||||||
|
Skip
|
||||||
}
|
}
|
||||||
|
|
@ -31,6 +31,8 @@ public partial class DamageResistance : Resource
|
||||||
case DamageAttribute.Immune:
|
case DamageAttribute.Immune:
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
|
case DamageAttribute.Skip:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
Sprites/Items/Heart_Extend.aseprite
(Stored with Git LFS)
Normal file
BIN
Sprites/Items/Heart_Extend.aseprite
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Sprites/Items/Heart_Extend.png
(Stored with Git LFS)
Normal file
BIN
Sprites/Items/Heart_Extend.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/Items/Heart_Extend.png.import
Normal file
34
Sprites/Items/Heart_Extend.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c8fr1ea20odaw"
|
||||||
|
path="res://.godot/imported/Heart_Extend.png-d149b0679640900324c05d8b4957c788.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Sprites/Items/Heart_Extend.png"
|
||||||
|
dest_files=["res://.godot/imported/Heart_Extend.png-d149b0679640900324c05d8b4957c788.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
Sprites/Items/Heart_Extend_Animated.png
(Stored with Git LFS)
Normal file
BIN
Sprites/Items/Heart_Extend_Animated.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/Items/Heart_Extend_Animated.png.import
Normal file
34
Sprites/Items/Heart_Extend_Animated.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c6gjpfxrux5uq"
|
||||||
|
path="res://.godot/imported/Heart_Extend_Animated.png-5f8fbef06f7cf313ae44f3f19ed11870.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Sprites/Items/Heart_Extend_Animated.png"
|
||||||
|
dest_files=["res://.godot/imported/Heart_Extend_Animated.png-5f8fbef06f7cf313ae44f3f19ed11870.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
Sprites/Items/Ice_Crystal_Shield.aseprite
(Stored with Git LFS)
Normal file
BIN
Sprites/Items/Ice_Crystal_Shield.aseprite
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Sprites/Items/Ice_Crystal_Shield.png
(Stored with Git LFS)
Normal file
BIN
Sprites/Items/Ice_Crystal_Shield.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/Items/Ice_Crystal_Shield.png.import
Normal file
34
Sprites/Items/Ice_Crystal_Shield.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cvc0x4bbnhusw"
|
||||||
|
path="res://.godot/imported/Ice_Crystal_Shield.png-29b9a8b6c8654a661999a750c26c4553.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Sprites/Items/Ice_Crystal_Shield.png"
|
||||||
|
dest_files=["res://.godot/imported/Ice_Crystal_Shield.png-29b9a8b6c8654a661999a750c26c4553.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Loading…
Add table
Add a link
Reference in a new issue