diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2022-06-03 21:13:19 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2022-06-03 21:13:19 -0600 |
commit | f922fe4669080d1633e0a345a3f8981867c9e841 (patch) | |
tree | 7c2c98bfca20fda37fe34ba99e2d3caa9a39ca02 /src/entities/actors/snake/scenes | |
parent | 898877f09808691a5e5d45850d27ae85f270db16 (diff) |
add working world gen, fixed food placing, minor refactoring
Diffstat (limited to 'src/entities/actors/snake/scenes')
-rw-r--r-- | src/entities/actors/snake/scenes/Body.tscn | 4 | ||||
-rw-r--r-- | src/entities/actors/snake/scenes/Head.tscn | 5 | ||||
-rw-r--r-- | src/entities/actors/snake/scenes/Snake.tscn | 9 | ||||
-rw-r--r-- | src/entities/actors/snake/scenes/Tail.tscn | 3 |
4 files changed, 14 insertions, 7 deletions
diff --git a/src/entities/actors/snake/scenes/Body.tscn b/src/entities/actors/snake/scenes/Body.tscn index 49694c0..7b5de58 100644 --- a/src/entities/actors/snake/scenes/Body.tscn +++ b/src/entities/actors/snake/scenes/Body.tscn @@ -4,8 +4,8 @@ [ext_resource path="res://entities/actors/snake/scripts/generic_segment.gd" type="Script" id=2] [sub_resource type="CapsuleShape2D" id=1] -radius = 4.99999 -height = 4.00002 +radius = 1.99999 +height = 2.00001 [node name="BodyPathFollow" type="PathFollow2D"] loop = false diff --git a/src/entities/actors/snake/scenes/Head.tscn b/src/entities/actors/snake/scenes/Head.tscn index d118fbf..336265b 100644 --- a/src/entities/actors/snake/scenes/Head.tscn +++ b/src/entities/actors/snake/scenes/Head.tscn @@ -3,8 +3,8 @@ [ext_resource path="res://entities/actors/snake/sprites/head.png" type="Texture" id=1] [ext_resource path="res://entities/actors/snake/scripts/head.gd" type="Script" id=2] -[sub_resource type="ConvexPolygonShape2D" id=1] -points = PoolVector2Array( -5, 0, 5, 0, 5, -3, 3, -4, 1, -5, -1, -5, -3, -4, -5, -3 ) +[sub_resource type="CircleShape2D" id=1] +radius = 2.0 [node name="Head" type="KinematicBody2D"] collision_mask = 262 @@ -14,4 +14,5 @@ script = ExtResource( 2 ) texture = ExtResource( 1 ) [node name="Collision" type="CollisionShape2D" parent="."] +position = Vector2( 0, -2 ) shape = SubResource( 1 ) diff --git a/src/entities/actors/snake/scenes/Snake.tscn b/src/entities/actors/snake/scenes/Snake.tscn index cb1eb2a..ea234c4 100644 --- a/src/entities/actors/snake/scenes/Snake.tscn +++ b/src/entities/actors/snake/scenes/Snake.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://entities/actors/snake/scenes/Head.tscn" type="PackedScene" id=1] [ext_resource path="res://entities/actors/snake/scenes/Body.tscn" type="PackedScene" id=2] [ext_resource path="res://entities/actors/snake/scripts/snake.gd" type="Script" id=3] [ext_resource path="res://entities/actors/snake/scenes/Tail.tscn" type="PackedScene" id=4] +[ext_resource path="res://entities/actors/snake/scripts/camera.gd" type="Script" id=5] [sub_resource type="Curve2D" id=1] _data = { @@ -15,7 +16,11 @@ script = ExtResource( 3 ) BODY_SEGMENT_NP = ExtResource( 2 ) TAIL_SEGMENT_NP = ExtResource( 4 ) +[node name="Head" parent="." instance=ExtResource( 1 )] + [node name="Path" type="Path2D" parent="."] curve = SubResource( 1 ) -[node name="Head" parent="." instance=ExtResource( 1 )] +[node name="Camera" type="Camera2D" parent="."] +current = true +script = ExtResource( 5 ) diff --git a/src/entities/actors/snake/scenes/Tail.tscn b/src/entities/actors/snake/scenes/Tail.tscn index 17e8ec5..adfe422 100644 --- a/src/entities/actors/snake/scenes/Tail.tscn +++ b/src/entities/actors/snake/scenes/Tail.tscn @@ -4,7 +4,7 @@ [ext_resource path="res://entities/actors/snake/scripts/generic_segment.gd" type="Script" id=2] [sub_resource type="CircleShape2D" id=1] -radius = 4.12311 +radius = 2.0 [node name="TailPathFollow" type="PathFollow2D"] loop = false @@ -20,4 +20,5 @@ collision_mask = 0 texture = ExtResource( 1 ) [node name="Collision" type="CollisionShape2D" parent="Tail"] +position = Vector2( 7.23998e-06, 2 ) shape = SubResource( 1 ) |