mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-13 14:55:54 +00:00
Spider bomb in FSM
This commit is contained in:
parent
d77fc7bf33
commit
4913eba12e
20 changed files with 300 additions and 48 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=42 format=3 uid="uid://c4pr2707hbeph"]
|
||||
[gd_scene load_steps=43 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://bw2hakslndaxm" path="res://Scripts/Components/FSM/PlayerStateMachine.cs" id="1_mpmil"]
|
||||
|
|
@ -28,6 +28,7 @@
|
|||
[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="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"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_b3hxm"]
|
||||
radius = 5.0
|
||||
|
|
@ -137,7 +138,7 @@ _inputProvider = NodePath("../../InputProvider")
|
|||
_damageReceiver = NodePath("../../DamageReceiver")
|
||||
_activationProvider = NodePath("../../InteractionProvider")
|
||||
_interactionController = NodePath("../../InteractionController")
|
||||
_moduleNodes = [NodePath("../../InteractionController")]
|
||||
_moduleNodes = [NodePath("../../InteractionController"), NodePath("../../ItemUser")]
|
||||
|
||||
[node name="Cutscene" type="Node2D" parent="StateMachine" node_paths=PackedStringArray("_animationProvider")]
|
||||
script = ExtResource("4_22ff8")
|
||||
|
|
@ -264,6 +265,9 @@ Shield = NodePath("../DamageReceiver/ShieldProvider")
|
|||
[node name="CollisionShape2D2" type="CollisionShape2D" parent="InteractionController"]
|
||||
shape = SubResource("CircleShape2D_g3wua")
|
||||
|
||||
[node name="ItemUser" type="Node2D" parent="."]
|
||||
script = ExtResource("29_m323t")
|
||||
|
||||
[connection signal="area_entered" from="DamageReceiver" to="DamageReceiver" method="_on_damage_hitbox_area_entered"]
|
||||
[connection signal="area_entered" from="InteractionProvider" to="InteractionProvider" method="_on_interaction_controller_area_entered"]
|
||||
[connection signal="area_exited" from="InteractionProvider" to="InteractionProvider" method="_on_interaction_controller_area_exited"]
|
||||
|
|
|
|||
|
|
@ -37,6 +37,16 @@ public partial class InteractionController : PlayerArea2DModule
|
|||
{
|
||||
}
|
||||
|
||||
public override void EnterState(PlayerState state)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ExitState(PlayerState state)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Init(IStateMachine<PlayerState, CharacterBody2D> machine)
|
||||
{
|
||||
base.Init(machine);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://cvctgw8eo2f7e"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://cvctgw8eo2f7e"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b3h7b30kerf60" path="res://Scripts/Interactables/ItemPickup.cs" id="1_bdsed"]
|
||||
[ext_resource type="Resource" uid="uid://dhbltvgsa3g88" path="res://Resources/Items/Spider_Bomb_Pickup.tres" id="2_bdsed"]
|
||||
[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="2_fyf8h"]
|
||||
[ext_resource type="Texture2D" uid="uid://huo14jdekj6n" path="res://Sprites/Bullets/spiderbomb.png" id="3_bdsed"]
|
||||
[ext_resource type="Texture2D" uid="uid://r2h77ktff10m" path="res://Sprites/Bullets/Snowball.png" id="3_bdsed"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_6vv2s"]
|
||||
|
||||
|
|
@ -26,7 +25,7 @@ animations = [{
|
|||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_bdsed")
|
||||
LootTable = Array[ExtResource("2_fyf8h")]([ExtResource("2_bdsed")])
|
||||
LootTable = [ExtResource("2_bdsed")]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_6vv2s")
|
||||
|
|
|
|||
|
|
@ -1,34 +1,57 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://64ax2lj77sr1"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://64ax2lj77sr1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dsa4b75hdig8p" path="res://Scripts/Bullet.cs" id="1_nrcj1"]
|
||||
[ext_resource type="Texture2D" uid="uid://huo14jdekj6n" path="res://Sprites/Bullets/spiderbomb.png" id="2_nrcj1"]
|
||||
[ext_resource type="Texture2D" uid="uid://r2h77ktff10m" path="res://Sprites/Bullets/Snowball.png" id="2_lhjit"]
|
||||
[ext_resource type="Texture2D" uid="uid://cf2855sd3hqty" path="res://Sprites/Actors/Aiming_Reticule_Small.png" id="3_lhjit"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_jxptd"]
|
||||
radius = 2.23607
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lhjit"]
|
||||
atlas = ExtResource("2_nrcj1")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ibnjy"]
|
||||
atlas = ExtResource("2_lhjit")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ibnjy"]
|
||||
atlas = ExtResource("2_nrcj1")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w1jch"]
|
||||
atlas = ExtResource("2_lhjit")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w1jch"]
|
||||
atlas = ExtResource("2_nrcj1")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o2e4e"]
|
||||
atlas = ExtResource("2_lhjit")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_co0jb"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ea6l6"]
|
||||
atlas = ExtResource("2_lhjit")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_f4bqv"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lhjit")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ibnjy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w1jch")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_o2e4e")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ea6l6")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_co0jb"]
|
||||
atlas = ExtResource("3_lhjit")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_o2e4e"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_co0jb")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
|
|
@ -48,10 +71,14 @@ shape = SubResource("CircleShape2D_jxptd")
|
|||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_co0jb")
|
||||
sprite_frames = SubResource("SpriteFrames_f4bqv")
|
||||
autoplay = "default"
|
||||
frame = 1
|
||||
frame_progress = 0.375255
|
||||
frame = 3
|
||||
frame_progress = 0.54531
|
||||
|
||||
[node name="AnimatedSprite2D2" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(18.545, 0)
|
||||
sprite_frames = SubResource("SpriteFrames_o2e4e")
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue