95 lines
2.2 KiB
Plaintext
95 lines
2.2 KiB
Plaintext
[gd_scene load_steps=6 format=2]
|
|
|
|
[ext_resource path="res://Scripts/MapGeneration.gd" type="Script" id=1]
|
|
[ext_resource path="res://general_theme.tres" type="Theme" id=2]
|
|
[ext_resource path="res://Nodes/Tiles.tres" type="TileSet" id=3]
|
|
|
|
[sub_resource type="GDScript" id=1]
|
|
script/source = "extends Node
|
|
|
|
var WAIT_TIME = 1
|
|
var timer #Timer object
|
|
|
|
func _ready():
|
|
start_timer(WAIT_TIME)
|
|
|
|
|
|
|
|
func start_timer(seconds):
|
|
timer = Timer.new()
|
|
add_child(timer)
|
|
timer.connect(\"timeout\", self, \"get_the_timeout\")
|
|
timer.start(seconds)
|
|
|
|
func get_the_timeout():
|
|
get_parent().defaultGenerator()
|
|
timer.queue_free()
|
|
|
|
func hideSelf():
|
|
queue_free()"
|
|
|
|
[sub_resource type="GDScript" id=2]
|
|
script/source = "extends Camera2D
|
|
|
|
var speed = 2
|
|
|
|
func _process(delta):
|
|
var cameraMoveDir = Vector2(0,0)
|
|
if(Input.is_action_pressed(\"right\")):
|
|
cameraMoveDir += Vector2(speed,0)
|
|
if(Input.is_action_pressed(\"left\")):
|
|
cameraMoveDir -= Vector2(speed,0)
|
|
|
|
if(Input.is_action_pressed(\"up\")):
|
|
cameraMoveDir -= Vector2(0,speed)
|
|
if(Input.is_action_pressed(\"down\")):
|
|
cameraMoveDir += Vector2(0,speed)
|
|
|
|
global_translate(cameraMoveDir)"
|
|
|
|
[node name="World" type="Node2D"]
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="LoadingScreen" type="CanvasLayer" parent="."]
|
|
script = SubResource( 1 )
|
|
|
|
[node name="ColorRect" type="ColorRect" parent="LoadingScreen"]
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
color = Color( 0, 0, 0, 1 )
|
|
|
|
[node name="Label" type="Label" parent="LoadingScreen"]
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
margin_left = -117.226
|
|
margin_top = -39.4122
|
|
margin_right = 176.774
|
|
margin_bottom = -23.4122
|
|
theme = ExtResource( 2 )
|
|
text = "Generating a new map..."
|
|
|
|
[node name="GenerationProgress" type="Label" parent="LoadingScreen"]
|
|
anchor_top = 1.0
|
|
anchor_bottom = 1.0
|
|
margin_left = 13.604
|
|
margin_top = -22.878
|
|
margin_right = 307.604
|
|
margin_bottom = -6.87799
|
|
theme = ExtResource( 2 )
|
|
|
|
[node name="TileMap" type="TileMap" parent="."]
|
|
tile_set = ExtResource( 3 )
|
|
cell_size = Vector2( 16, 16 )
|
|
collision_layer = 7
|
|
format = 1
|
|
|
|
[node name="Camera2D" type="Camera2D" parent="."]
|
|
scale = Vector2( 10, 10 )
|
|
current = true
|
|
script = SubResource( 2 )
|
|
|
|
[node name="CanvasModulate" type="CanvasModulate" parent="."]
|
|
color = Color( 0.713726, 0.713726, 0.713726, 1 )
|