76 lines
2.6 KiB
Plaintext
76 lines
2.6 KiB
Plaintext
[gd_scene format=3 uid="uid://dxluckxdkpv4f"]
|
|
|
|
[ext_resource type="Script" uid="uid://di7eglnrnqm6i" path="res://molecular/molecular_player.gd" id="1_0ix7k"]
|
|
[ext_resource type="Texture2D" uid="uid://du1lb4nr47kvl" path="res://molecular/assets/player-sprite-attacking.png" id="2_rq1v6"]
|
|
[ext_resource type="Texture2D" uid="uid://bsd1qtw50esai" path="res://molecular/assets/player-sprite-attacking2.png" id="3_xiwfn"]
|
|
[ext_resource type="Texture2D" uid="uid://cd0iv6hsi3fad" path="res://molecular/assets/player-sprite.png" id="4_rq1v6"]
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_onrkg"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 0.5,
|
|
"texture": ExtResource("2_rq1v6")
|
|
}, {
|
|
"duration": 4.0,
|
|
"texture": ExtResource("3_xiwfn")
|
|
}, {
|
|
"duration": 0.5,
|
|
"texture": ExtResource("2_rq1v6")
|
|
}],
|
|
"loop": true,
|
|
"name": &"attacking",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 5.0,
|
|
"texture": ExtResource("4_rq1v6")
|
|
}],
|
|
"loop": true,
|
|
"name": &"default",
|
|
"speed": 5.0
|
|
}]
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_5hxmy"]
|
|
radius = 10.999997
|
|
|
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_4flbx"]
|
|
radius = 5.999982
|
|
height = 27.990019
|
|
|
|
[node name="player" type="CharacterBody2D" unique_id=2032508208]
|
|
collision_mask = 14
|
|
script = ExtResource("1_0ix7k")
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1745800698]
|
|
visibility_layer = 2
|
|
sprite_frames = SubResource("SpriteFrames_onrkg")
|
|
animation = &"attacking"
|
|
|
|
[node name="AttackArea" type="Area2D" parent="." unique_id=187975387]
|
|
position = Vector2(0, 56)
|
|
rotation = -1.5732701
|
|
collision_mask = 6
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="AttackArea" unique_id=1968501358]
|
|
position = Vector2(55.984985, 6.138512)
|
|
shape = SubResource("CircleShape2D_5hxmy")
|
|
debug_color = Color(0.80813414, 0.3957308, 0.3356335, 0.41960785)
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=2137063701 groups=["player"]]
|
|
rotation = -1.5732701
|
|
shape = SubResource("CapsuleShape2D_4flbx")
|
|
|
|
[node name="AttackTimer" type="Timer" parent="." unique_id=2057433652]
|
|
one_shot = true
|
|
|
|
[node name="AttackCooldownTimer" type="Timer" parent="." unique_id=1056439284]
|
|
one_shot = true
|
|
|
|
[node name="InvulnerableCooldownTimer" type="Timer" parent="." unique_id=311411582]
|
|
one_shot = true
|
|
|
|
[connection signal="body_entered" from="AttackArea" to="." method="_on_attack_hit"]
|
|
[connection signal="timeout" from="AttackTimer" to="." method="_on_attack_timeout"]
|
|
[connection signal="timeout" from="AttackCooldownTimer" to="." method="_on_attack_cooldown_timeout"]
|
|
[connection signal="timeout" from="InvulnerableCooldownTimer" to="." method="_on_invulnerable_cooldown_timeout"]
|