From 36874a535a3d5f7f2955f33e34aa1a4768b6fec1 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sat, 4 Jun 2022 03:17:22 -0600 Subject: added hud for snake size and grow progress --- src/ui/hud/snake/scenes/SnakeHUD.tscn | 12 ++++++++++++ src/ui/hud/snake/scenes/SnakeHead.tscn | 8 ++++++++ src/ui/hud/snake/scenes/SnakeSegment.tscn | 5 +++++ 3 files changed, 25 insertions(+) create mode 100644 src/ui/hud/snake/scenes/SnakeHUD.tscn create mode 100644 src/ui/hud/snake/scenes/SnakeHead.tscn create mode 100644 src/ui/hud/snake/scenes/SnakeSegment.tscn (limited to 'src/ui/hud/snake/scenes') diff --git a/src/ui/hud/snake/scenes/SnakeHUD.tscn b/src/ui/hud/snake/scenes/SnakeHUD.tscn new file mode 100644 index 0000000..4b33885 --- /dev/null +++ b/src/ui/hud/snake/scenes/SnakeHUD.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://ui/hud/snake/scenes/SnakeHead.tscn" type="PackedScene" id=1] +[ext_resource path="res://ui/hud/snake/scripts/snake_hud.gd" type="Script" id=2] +[ext_resource path="res://ui/hud/snake/sprites/head1.png" type="Texture" id=3] + +[node name="SnakeHUD" type="HBoxContainer"] +custom_constants/separation = 0 +script = ExtResource( 2 ) + +[node name="SnakeHead" parent="." instance=ExtResource( 1 )] +texture = ExtResource( 3 ) diff --git a/src/ui/hud/snake/scenes/SnakeHead.tscn b/src/ui/hud/snake/scenes/SnakeHead.tscn new file mode 100644 index 0000000..79eb7d1 --- /dev/null +++ b/src/ui/hud/snake/scenes/SnakeHead.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://ui/hud/snake/scripts/snake_head.gd" type="Script" id=1] + +[node name="SnakeHead" type="TextureRect"] +margin_right = 8.0 +margin_bottom = 8.0 +script = ExtResource( 1 ) diff --git a/src/ui/hud/snake/scenes/SnakeSegment.tscn b/src/ui/hud/snake/scenes/SnakeSegment.tscn new file mode 100644 index 0000000..069a812 --- /dev/null +++ b/src/ui/hud/snake/scenes/SnakeSegment.tscn @@ -0,0 +1,5 @@ +[gd_scene format=2] + +[node name="SnakeSegment" type="TextureRect"] +margin_right = 4.0 +margin_bottom = 4.0 -- cgit v1.2.3-70-g09d2