cute lil prototype

This commit is contained in:
Tabby 2025-06-28 13:09:15 +10:00
parent 57f147236a
commit 0e4a55d7bd
19 changed files with 305 additions and 2 deletions

View file

@ -1,8 +1,14 @@
[gd_scene load_steps=8 format=3 uid="uid://hv07lm2tjwn4"]
[gd_scene load_steps=14 format=3 uid="uid://hv07lm2tjwn4"]
[ext_resource type="PackedScene" uid="uid://crrbht7mwhgyc" path="res://Prefabs/lander.tscn" id="1_80nbo"]
[ext_resource type="Script" uid="uid://bltj2frs6vqwj" path="res://autoscroll.gd" id="1_feb5d"]
[ext_resource type="Script" uid="uid://mwbiu2ajbxlk" path="res://battery_manager.gd" id="1_ryrav"]
[ext_resource type="Texture2D" uid="uid://evhjxwdbsmlo" path="res://Sprites/start.png" id="2_e2o6t"]
[ext_resource type="Texture2D" uid="uid://1uqioi3jaw62" path="res://Sprites/batteryOutline.png" id="2_eow3j"]
[ext_resource type="Texture2D" uid="uid://1gx13iy21l2a" path="res://Sprites/batteryfull.png" id="3_j5wjh"]
[ext_resource type="PackedScene" uid="uid://cfdsa5scvso6m" path="res://Prefabs/spare_battery.tscn" id="4_eow3j"]
[ext_resource type="Script" uid="uid://dd8psfqfobgau" path="res://test_obstacle_spawner.gd" id="6_vef74"]
[ext_resource type="PackedScene" uid="uid://jb677rdhbj83" path="res://Prefabs/obstacle.tscn" id="8_j5wjh"]
[sub_resource type="Gradient" id="Gradient_mwb40"]
offsets = PackedFloat32Array(0.806763, 1)
@ -35,10 +41,51 @@ offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("NoiseTexture2D_mwb40")
[node name="UI" type="Control" parent="CanvasLayer"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="BatteryHolder" type="HBoxContainer" parent="CanvasLayer/UI" node_paths=PackedStringArray("current_battery")]
layout_mode = 1
offset_right = 68.0
offset_bottom = 32.0
script = ExtResource("1_ryrav")
current_battery = NodePath("Battery")
battery_drain = 4.0
[node name="Battery" type="TextureProgressBar" parent="CanvasLayer/UI/BatteryHolder"]
layout_mode = 2
max_value = 16.0
value = 16.0
fill_mode = 3
texture_under = ExtResource("2_eow3j")
texture_progress = ExtResource("3_j5wjh")
tint_progress = Color(0, 1, 0, 1)
[node name="Battery2" parent="CanvasLayer/UI/BatteryHolder" instance=ExtResource("4_eow3j")]
layout_mode = 2
[node name="Battery3" type="TextureProgressBar" parent="CanvasLayer/UI/BatteryHolder"]
layout_mode = 2
max_value = 16.0
value = 16.0
fill_mode = 3
texture_under = ExtResource("2_eow3j")
texture_progress = ExtResource("3_j5wjh")
tint_progress = Color(0, 1, 0, 1)
[node name="Camera2D" type="Camera2D" parent="."]
anchor_mode = 0
script = ExtResource("1_feb5d")
[node name="TestObstacleSpawner" type="Node2D" parent="Camera2D"]
position = Vector2(673, 0)
script = ExtResource("6_vef74")
[node name="Lander" parent="." instance=ExtResource("1_80nbo")]
position = Vector2(95, 324)
@ -52,4 +99,20 @@ texture = ExtResource("2_e2o6t")
position = Vector2(-262.5, 170)
shape = SubResource("RectangleShape2D_feb5d")
[node name="Obstacle" parent="." instance=ExtResource("8_j5wjh")]
position = Vector2(240, 265)
[node name="Obstacle2" parent="." instance=ExtResource("8_j5wjh")]
position = Vector2(301, 100)
[node name="Obstacle3" parent="." instance=ExtResource("8_j5wjh")]
position = Vector2(425, 224)
[node name="Obstacle4" parent="." instance=ExtResource("8_j5wjh")]
position = Vector2(582, 320)
[node name="Obstacle5" parent="." instance=ExtResource("8_j5wjh")]
position = Vector2(549, 39)
[connection signal="moved" from="Lander" to="Camera2D" method="_on_lander_moved"]
[connection signal="moved" from="Lander" to="Camera2D/TestObstacleSpawner" method="_on_lander_moved"]