summaryrefslogtreecommitdiff
path: root/src/entities/actors/snake/Snake.tscn
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2022-05-30 02:05:19 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2022-05-30 02:05:19 -0600
commit0aa26dc19da1c8907cd69d18b423c33f351d3f2f (patch)
tree1f66ccb21df5d7cd508e50be7b4fe97fe400c580 /src/entities/actors/snake/Snake.tscn
parent8165182a3ec840726eaa75678ea23f7ef8e6938e (diff)
working path2d with only the head, need to figure out the segments part
Diffstat (limited to 'src/entities/actors/snake/Snake.tscn')
-rw-r--r--src/entities/actors/snake/Snake.tscn23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/entities/actors/snake/Snake.tscn b/src/entities/actors/snake/Snake.tscn
new file mode 100644
index 0000000..98d106c
--- /dev/null
+++ b/src/entities/actors/snake/Snake.tscn
@@ -0,0 +1,23 @@
+[gd_scene load_steps=5 format=2]
+
+[ext_resource path="res://entities/actors/snake/head/Head.tscn" type="PackedScene" id=1]
+[ext_resource path="res://entities/actors/snake/body_segment/BodySegment.tscn" type="PackedScene" id=2]
+[ext_resource path="res://entities/actors/snake/snake.gd" type="Script" id=3]
+
+[sub_resource type="Curve2D" id=1]
+_data = {
+"points": PoolVector2Array( )
+}
+
+[node name="Snake" type="Node2D"]
+script = ExtResource( 3 )
+BODY_SEGMENT_NP = ExtResource( 2 )
+
+[node name="Head" parent="." instance=ExtResource( 1 )]
+
+[node name="Path" type="Path2D" parent="."]
+curve = SubResource( 1 )
+
+[node name="PathFollow" type="PathFollow2D" parent="Path"]
+loop = false
+lookahead = 1.0