init
This commit is contained in:
commit
1bae9f78bd
73 changed files with 6521 additions and 0 deletions
29
scenes/background/background.tscn
Normal file
29
scenes/background/background.tscn
Normal file
|
@ -0,0 +1,29 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://pkc0xylwcsvx"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/background/cloud_spawner.gd" id="1_luuon"]
|
||||
|
||||
[node name="Background" type="CanvasLayer"]
|
||||
layer = -1
|
||||
|
||||
[node name="clouds" type="Node2D" parent="."]
|
||||
position = Vector2(1568, 0)
|
||||
|
||||
[node name="cloud spawner" type="Marker2D" parent="."]
|
||||
position = Vector2(1568, 0)
|
||||
script = ExtResource("1_luuon")
|
||||
|
||||
[node name="spawn" type="Timer" parent="cloud spawner"]
|
||||
wait_time = 1.5
|
||||
autostart = true
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
z_index = -1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.815686, 0.964706, 1, 1)
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[connection signal="timeout" from="cloud spawner/spawn" to="cloud spawner" method="_on_spawn_timeout"]
|
9
scenes/background/cloud_spawner.gd
Normal file
9
scenes/background/cloud_spawner.gd
Normal file
|
@ -0,0 +1,9 @@
|
|||
extends Marker2D
|
||||
|
||||
|
||||
|
||||
const cloud = preload("res://scenes/cloud/cloud.tscn")
|
||||
func _on_spawn_timeout() -> void:
|
||||
var instance = cloud.instantiate()
|
||||
instance.global_position = Vector2(0,randi_range(0,600))
|
||||
$"../clouds".add_child(instance)
|
Loading…
Add table
Add a link
Reference in a new issue