67 lines
2.7 KiB
Text
67 lines
2.7 KiB
Text
[gd_scene format=3 uid="uid://cgkrqn4f7ko13"]
|
|
|
|
[ext_resource type="Script" uid="uid://cn8wlp7qayg1n" path="res://behaviours/check_weapon.gd" id="1_od7c4"]
|
|
[ext_resource type="Script" uid="uid://bp4utstetxnhr" path="res://behaviours/animate.gd" id="2_tes41"]
|
|
[ext_resource type="PackedScene" uid="uid://bei8dsmocqe8x" path="res://behaviours/branches/sequence_swing_chain.tscn" id="3_v5s0q"]
|
|
[ext_resource type="PackedScene" uid="uid://blpbabfwxdvfr" path="res://behaviours/branches/sequence_jab_chain.tscn" id="4_jd5ki"]
|
|
|
|
[sub_resource type="GDScript" id="GDScript_xqvpn"]
|
|
resource_name = "Wait"
|
|
script/source = "extends BehaviourAction
|
|
|
|
@onready var body := get_behaviour_tree().get_parent() as CharacterBody3D
|
|
|
|
func _enter() -> int:
|
|
$Timer.start()
|
|
return Running
|
|
|
|
func _execute() -> int:
|
|
return Success if $Timer.time_left == 0 else Running if not body.hurt_high else Fail
|
|
"
|
|
|
|
[node name="SelectorAttackAnimation" type="BehaviourSelector" unique_id=465551260]
|
|
|
|
[node name="SequenceSword" type="BehaviourSequence" parent="." unique_id=615709382]
|
|
|
|
[node name="HasSword" type="BehaviourAction" parent="SequenceSword" unique_id=127929802]
|
|
script = ExtResource("1_od7c4")
|
|
match_type = "sword"
|
|
|
|
[node name="PlayReady" type="BehaviourAction" parent="SequenceSword" unique_id=1222741719]
|
|
script = ExtResource("2_tes41")
|
|
anim_name = "ready_sword"
|
|
allow_interrupt = false
|
|
wait_for_finish = false
|
|
|
|
[node name="Wait" type="BehaviourAction" parent="SequenceSword" unique_id=842355284]
|
|
script = SubResource("GDScript_xqvpn")
|
|
|
|
[node name="Timer" type="Timer" parent="SequenceSword/Wait" unique_id=582826945]
|
|
wait_time = 0.2
|
|
one_shot = true
|
|
|
|
[node name="AlwaysSuccessSwings" type="BehaviourAlwaysSuccess" parent="SequenceSword" unique_id=915120373]
|
|
|
|
[node name="SequenceSwingChain" parent="SequenceSword/AlwaysSuccessSwings" unique_id=1852235271 instance=ExtResource("3_v5s0q")]
|
|
|
|
[node name="SequenceUnarmed" type="BehaviourSequence" parent="." unique_id=909023413]
|
|
|
|
[node name="IsUnarmed" type="BehaviourAction" parent="SequenceUnarmed" unique_id=67204301]
|
|
script = ExtResource("1_od7c4")
|
|
|
|
[node name="PlayReady" type="BehaviourAction" parent="SequenceUnarmed" unique_id=1398202486]
|
|
script = ExtResource("2_tes41")
|
|
anim_name = "ready_unarmed"
|
|
allow_interrupt = false
|
|
wait_for_finish = false
|
|
|
|
[node name="Wait" type="BehaviourAction" parent="SequenceUnarmed" unique_id=420527471]
|
|
script = SubResource("GDScript_xqvpn")
|
|
|
|
[node name="Timer" type="Timer" parent="SequenceUnarmed/Wait" unique_id=48948915]
|
|
wait_time = 0.2
|
|
one_shot = true
|
|
|
|
[node name="AlwaysSuccessJabs" type="BehaviourAlwaysSuccess" parent="SequenceUnarmed" unique_id=816001427]
|
|
|
|
[node name="SequenceJabChain" parent="SequenceUnarmed/AlwaysSuccessJabs" unique_id=376452224 instance=ExtResource("4_jd5ki")]
|