From fa98822a569c1efa2bebc705073c3921b9ae4217 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sat, 4 Jun 2022 03:46:31 -0600 Subject: added progress bar as well as tongue to the snake --- src/entities/actors/snake/scenes/Head.tscn | 31 +++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'src/entities/actors/snake/scenes') diff --git a/src/entities/actors/snake/scenes/Head.tscn b/src/entities/actors/snake/scenes/Head.tscn index 336265b..a08197b 100644 --- a/src/entities/actors/snake/scenes/Head.tscn +++ b/src/entities/actors/snake/scenes/Head.tscn @@ -1,7 +1,32 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=10 format=2] [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] +[ext_resource path="res://entities/actors/snake/sprites/tongue.png" type="Texture" id=3] + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 3 ) +region = Rect2( 0, 0, 4, 4 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 3 ) +region = Rect2( 4, 0, 4, 4 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 3 ) +region = Rect2( 8, 0, 4, 4 ) + +[sub_resource type="AtlasTexture" id=5] +atlas = ExtResource( 3 ) +region = Rect2( 12, 0, 4, 4 ) + +[sub_resource type="SpriteFrames" id=6] +animations = [ { +"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ], +"loop": false, +"name": "default", +"speed": 15.0 +} ] [sub_resource type="CircleShape2D" id=1] radius = 2.0 @@ -10,6 +35,10 @@ radius = 2.0 collision_mask = 262 script = ExtResource( 2 ) +[node name="Tongue" type="AnimatedSprite" parent="."] +position = Vector2( 0, -5 ) +frames = SubResource( 6 ) + [node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 1 ) -- cgit v1.2.3-70-g09d2