From bcbe8ab287e5aa6b3fb4a49cb7d1f29eaef14ea7 Mon Sep 17 00:00:00 2001 From: Tabby <41929769+tabby-cat-nya@users.noreply.github.com> Date: Fri, 18 Jul 2025 22:41:26 +1000 Subject: [PATCH] meow --- Prefabs/lander.tscn | 10 +++++++++- Prefabs/spare_battery.tscn | 5 +++-- Sprites/fullAlt.png | Bin 0 -> 422 bytes Sprites/fullAlt.png.import | 34 ++++++++++++++++++++++++++++++++++ autoscroll.gd | 4 +++- game.tscn | 22 ++++------------------ 6 files changed, 53 insertions(+), 22 deletions(-) create mode 100644 Sprites/fullAlt.png create mode 100644 Sprites/fullAlt.png.import diff --git a/Prefabs/lander.tscn b/Prefabs/lander.tscn index 8b5752f..04e260c 100644 --- a/Prefabs/lander.tscn +++ b/Prefabs/lander.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=5 format=3 uid="uid://crrbht7mwhgyc"] +[gd_scene load_steps=6 format=3 uid="uid://crrbht7mwhgyc"] [ext_resource type="Script" uid="uid://cd54ktlkabbla" path="res://ship.gd" id="1_do8h0"] [ext_resource type="Texture2D" uid="uid://bd5oswedqnenh" path="res://Sprites/LanderArt.png" id="2_do8h0"] @@ -10,6 +10,9 @@ size = Vector2(8, 2) offsets = PackedFloat32Array(0, 0.0886699, 1) colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0) +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_do8h0"] +height = 32.0 + [node name="Lander" type="RigidBody2D" node_paths=PackedStringArray("particles_l", "particles_r")] gravity_scale = 0.2 script = ExtResource("1_do8h0") @@ -56,3 +59,8 @@ damping_max = 60.8 scale_amount_min = 6.0 scale_amount_max = 6.0 color_ramp = SubResource("Gradient_do8h0") + +[node name="CollisionShape2D3" type="CollisionShape2D" parent="."] +position = Vector2(0, -3) +rotation = -1.57079 +shape = SubResource("CapsuleShape2D_do8h0") diff --git a/Prefabs/spare_battery.tscn b/Prefabs/spare_battery.tscn index 6c7721e..b17743a 100644 --- a/Prefabs/spare_battery.tscn +++ b/Prefabs/spare_battery.tscn @@ -1,12 +1,13 @@ [gd_scene load_steps=3 format=3 uid="uid://cfdsa5scvso6m"] [ext_resource type="Texture2D" uid="uid://1uqioi3jaw62" path="res://Sprites/batteryOutline.png" id="1_extsq"] -[ext_resource type="Texture2D" uid="uid://1gx13iy21l2a" path="res://Sprites/batteryfull.png" id="2_n31ms"] +[ext_resource type="Texture2D" uid="uid://wkhhifawnhew" path="res://Sprites/fullAlt.png" id="2_extsq"] [node name="Battery2" type="TextureProgressBar"] max_value = 16.0 +step = 0.0 value = 16.0 fill_mode = 3 texture_under = ExtResource("1_extsq") -texture_progress = ExtResource("2_n31ms") +texture_progress = ExtResource("2_extsq") tint_progress = Color(0, 1, 0, 1) diff --git a/Sprites/fullAlt.png b/Sprites/fullAlt.png new file mode 100644 index 0000000000000000000000000000000000000000..d94f6271c18759b6c0462d7423527713e5bfc8b8 GIT binary patch literal 422 zcmeAS@N?(olHy`uVBq!ia0vp^B0#Lb!3-o-_pE3EQjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`IRkt`Tn`*L@c;jRAg^{;L@SVDE(!7r1`1q1#S2u+z**oCSkOkFcXkY-6J(DL^ z;}!fu2FNt@ba4#P2u@Bo#PosF$boSR`%;O64Kj`!5(69s8aSL-5)wiRGPoBpZctD= dpmgF03xmoYW?oC4k2gRDdAj void: # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: if active: - position.x += delta * camera_speed + current_speed = clampf(current_speed + 10* delta,0,camera_speed) + position.x += delta * current_speed func _on_lander_moved() -> void: diff --git a/game.tscn b/game.tscn index c3c2a98..bae4db0 100644 --- a/game.tscn +++ b/game.tscn @@ -1,11 +1,9 @@ -[gd_scene load_steps=14 format=3 uid="uid://hv07lm2tjwn4"] +[gd_scene load_steps=12 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"] @@ -54,28 +52,16 @@ layout_mode = 1 offset_right = 68.0 offset_bottom = 32.0 script = ExtResource("1_ryrav") -current_battery = NodePath("Battery") +current_battery = NodePath("Battery4") -[node name="Battery" type="TextureProgressBar" parent="CanvasLayer/UI/BatteryHolder"] +[node name="Battery4" parent="CanvasLayer/UI/BatteryHolder" instance=ExtResource("4_eow3j")] 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"] +[node name="Battery3" parent="CanvasLayer/UI/BatteryHolder" instance=ExtResource("4_eow3j")] 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