meow
This commit is contained in:
parent
1a5c9d3425
commit
bcbe8ab287
6 changed files with 53 additions and 22 deletions
|
|
@ -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="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"]
|
[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)
|
offsets = PackedFloat32Array(0, 0.0886699, 1)
|
||||||
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0)
|
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")]
|
[node name="Lander" type="RigidBody2D" node_paths=PackedStringArray("particles_l", "particles_r")]
|
||||||
gravity_scale = 0.2
|
gravity_scale = 0.2
|
||||||
script = ExtResource("1_do8h0")
|
script = ExtResource("1_do8h0")
|
||||||
|
|
@ -56,3 +59,8 @@ damping_max = 60.8
|
||||||
scale_amount_min = 6.0
|
scale_amount_min = 6.0
|
||||||
scale_amount_max = 6.0
|
scale_amount_max = 6.0
|
||||||
color_ramp = SubResource("Gradient_do8h0")
|
color_ramp = SubResource("Gradient_do8h0")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D3" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2(0, -3)
|
||||||
|
rotation = -1.57079
|
||||||
|
shape = SubResource("CapsuleShape2D_do8h0")
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://cfdsa5scvso6m"]
|
[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://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"]
|
[node name="Battery2" type="TextureProgressBar"]
|
||||||
max_value = 16.0
|
max_value = 16.0
|
||||||
|
step = 0.0
|
||||||
value = 16.0
|
value = 16.0
|
||||||
fill_mode = 3
|
fill_mode = 3
|
||||||
texture_under = ExtResource("1_extsq")
|
texture_under = ExtResource("1_extsq")
|
||||||
texture_progress = ExtResource("2_n31ms")
|
texture_progress = ExtResource("2_extsq")
|
||||||
tint_progress = Color(0, 1, 0, 1)
|
tint_progress = Color(0, 1, 0, 1)
|
||||||
|
|
|
||||||
BIN
Sprites/fullAlt.png
Normal file
BIN
Sprites/fullAlt.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 422 B |
34
Sprites/fullAlt.png.import
Normal file
34
Sprites/fullAlt.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://wkhhifawnhew"
|
||||||
|
path="res://.godot/imported/fullAlt.png-b65fa558e3aa10a8bd4bf9b7c8a58678.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Sprites/fullAlt.png"
|
||||||
|
dest_files=["res://.godot/imported/fullAlt.png-b65fa558e3aa10a8bd4bf9b7c8a58678.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
extends Camera2D
|
extends Camera2D
|
||||||
|
|
||||||
@export var camera_speed : float = 10
|
@export var camera_speed : float = 10
|
||||||
|
var current_speed : float = 0
|
||||||
var active : bool = false
|
var active : bool = false
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
|
@ -11,7 +12,8 @@ func _ready() -> void:
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
if active:
|
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:
|
func _on_lander_moved() -> void:
|
||||||
|
|
|
||||||
22
game.tscn
22
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="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://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="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://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="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="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"]
|
[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_right = 68.0
|
||||||
offset_bottom = 32.0
|
offset_bottom = 32.0
|
||||||
script = ExtResource("1_ryrav")
|
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
|
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")]
|
[node name="Battery2" parent="CanvasLayer/UI/BatteryHolder" instance=ExtResource("4_eow3j")]
|
||||||
layout_mode = 2
|
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
|
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="."]
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
anchor_mode = 0
|
anchor_mode = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue