feat: 添加敌人并且追踪player,同时避免敌人重叠
This commit is contained in:
@@ -1,18 +1,44 @@
|
||||
[gd_scene format=3 uid="uid://cgljr7wcstmyp"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d2l68snnemcet" path="res://scenes/unit/unit.tscn" id="1_wkafa"]
|
||||
[ext_resource type="Texture2D" uid="uid://cproxhccob85g" path="res://assets/sprites/Players/Player_1.png" id="2_etcc1"]
|
||||
[ext_resource type="Script" uid="uid://b5makasbbi1ov" path="res://scenes/unit/players/player.gd" id="2_xa7el"]
|
||||
[ext_resource type="Resource" uid="uid://btnfef0ui2ju8" path="res://resources/units/players/stats_player_well_rounded.tres" id="3_xa7el"]
|
||||
[ext_resource type="Script" uid="uid://bkfe6nn8yxhbq" path="res://scenes/unit/players/trail.gd" id="4_0kki1"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_ht2l1"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_etcc1"]
|
||||
radius = 30.0
|
||||
|
||||
[node name="PlayerWellRounded" unique_id=2022554550 instance=ExtResource("1_wkafa")]
|
||||
collision_mask = 2
|
||||
script = ExtResource("2_xa7el")
|
||||
dash_duration = 0.4
|
||||
dash_speed_multi = 2.7
|
||||
dash_cooldown = 1.5
|
||||
stats = ExtResource("3_xa7el")
|
||||
|
||||
[node name="Trail" type="Line2D" parent="Visuals" parent_id_path=PackedInt32Array(395976388) index="0" unique_id=1482185349 node_paths=PackedStringArray("player")]
|
||||
unique_name_in_owner = true
|
||||
top_level = true
|
||||
position = Vector2(0, -31)
|
||||
width = 40.0
|
||||
width_curve = SubResource("Curve_ht2l1")
|
||||
script = ExtResource("4_0kki1")
|
||||
player = NodePath("../..")
|
||||
|
||||
[node name="Shadow" parent="Visuals" parent_id_path=PackedInt32Array(395976388) index="1" unique_id=2136480859]
|
||||
z_index = 1
|
||||
|
||||
[node name="Sprite" parent="Visuals" parent_id_path=PackedInt32Array(395976388) index="2" unique_id=1925870318]
|
||||
z_index = 1
|
||||
texture = ExtResource("2_etcc1")
|
||||
|
||||
[node name="CollisionShape2D" parent="." index="1" unique_id=139786467]
|
||||
visible = false
|
||||
position = Vector2(0, -31)
|
||||
shape = SubResource("CircleShape2D_etcc1")
|
||||
|
||||
@@ -22,4 +48,8 @@ one_shot = true
|
||||
[node name="DashCooldownTimer" type="Timer" parent="." index="4" unique_id=278610339]
|
||||
one_shot = true
|
||||
|
||||
[node name="TrailTimer" type="Timer" parent="." index="5" unique_id=2006934730]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[connection signal="timeout" from="DashTimer" to="." method="_on_dash_timer_timeout"]
|
||||
[connection signal="timeout" from="TrailTimer" to="Visuals/Trail" method="_on_trail_timer_timeout"]
|
||||
|
||||
Reference in New Issue
Block a user