diff options
author | Daniel Weipert <code@drogueronin.de> | 2020-12-31 11:33:12 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2020-12-31 11:33:12 +0100 |
commit | fb64f15e22acfc1c03c7c5357dd66077454adbcf (patch) | |
tree | 96cdbb8f59bd65609aa76276dfba94f9cdad33d4 /Levels |
Initial commit
Diffstat (limited to 'Levels')
-rw-r--r-- | Levels/Level.gd | 30 | ||||
-rw-r--r-- | Levels/Level_0001.gd | 5 | ||||
-rw-r--r-- | Levels/Level_0001.tscn | 35 |
3 files changed, 70 insertions, 0 deletions
diff --git a/Levels/Level.gd b/Levels/Level.gd new file mode 100644 index 0000000..f47f3a0 --- /dev/null +++ b/Levels/Level.gd @@ -0,0 +1,30 @@ +extends Node2D + + +export var starting_position = Vector2(0, 0) +export var camera_limit_left = 0 +export var camera_limit_top = 0 +export var camera_limit_right = 0 +export var camera_limit_bottom = 0 + + +var idx = 0 + +var HUD = CanvasLayer.new() + +var timer = 0 +var LabelTimer = preload("res://UI/HUD/Timer.tscn").instance() + + +func _ready(): + self.HUD.add_child(self.LabelTimer) + self.add_child(self.HUD) + + +func _process(delta): + self.timer += delta + self.LabelTimer.text = "%.2fs" % self.timer + + +func end_level(): + Global.end_level(self) diff --git a/Levels/Level_0001.gd b/Levels/Level_0001.gd new file mode 100644 index 0000000..3fffc27 --- /dev/null +++ b/Levels/Level_0001.gd @@ -0,0 +1,5 @@ +extends "res://Levels/Level.gd" + + +func _ready(): + pass diff --git a/Levels/Level_0001.tscn b/Levels/Level_0001.tscn new file mode 100644 index 0000000..bbae830 --- /dev/null +++ b/Levels/Level_0001.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://Assets/platforms.tres" type="TileSet" id=1] +[ext_resource path="res://Character.tscn" type="PackedScene" id=2] +[ext_resource path="res://Objects/Flag.tscn" type="PackedScene" id=3] +[ext_resource path="res://Levels/Level_0001.gd" type="Script" id=4] + +[node name="Level_0001" type="Node2D"] +script = ExtResource( 4 ) +startingPosition = Vector2( 144.471, 115.947 ) +cameraLimitRight = 700 +cameraLimitBottom = 500 + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource( 1 ) +cell_size = Vector2( 16, 16 ) +format = 1 +tile_data = PoolIntArray( 327692, 0, 6, 327693, 0, 8, 393228, 0, 65542, 393229, 0, 65545, 458764, 0, 65542, 458765, 0, 65545, 524295, 0, 0, 524296, 0, 1, 524297, 0, 1, 524298, 0, 1, 524299, 0, 1, 524300, 0, 65542, 524301, 0, 65545, 524302, 0, 1, 524303, 0, 1, 524304, 0, 1, 524305, 0, 1, 524306, 0, 1, 524307, 0, 2, 589836, 0, 131078, 589837, 0, 131080, 720918, 0, 0, 720919, 0, 1, 720920, 0, 1, 720921, 0, 1, 720922, 0, 1, 720923, 0, 1, 720924, 0, 1, 720925, 0, 1, 720926, 0, 1, 720927, 0, 1, 720928, 0, 1, 720929, 0, 1, 720930, 0, 1, 720931, 0, 1, 720932, 0, 1, 720933, 0, 1, 720934, 0, 1, 720935, 0, 1, 720936, 0, 1, 720937, 0, 2, 917518, 0, 6, 917519, 0, 8, 917523, 0, 6, 917524, 0, 8, 983054, 0, 65542, 983055, 0, 65545, 983059, 0, 65542, 983060, 0, 65545, 1048590, 0, 65542, 1048591, 0, 65545, 1048595, 0, 65542, 1048596, 0, 65545, 1114126, 0, 65542, 1114127, 0, 65545, 1114131, 0, 65542, 1114132, 0, 65545, 1179662, 0, 65542, 1179663, 0, 65545, 1179667, 0, 65542, 1179668, 0, 65545, 1245198, 0, 65542, 1245199, 0, 65545, 1245203, 0, 65542, 1245204, 0, 65545, 1310734, 0, 65542, 1310735, 0, 65545, 1310739, 0, 65542, 1310740, 0, 65545, 1376270, 0, 65542, 1376271, 0, 65545, 1376275, 0, 65542, 1376276, 0, 65545, 1441806, 0, 65542, 1441807, 0, 65545, 1441811, 0, 65542, 1441812, 0, 65545, 1507342, 0, 65542, 1507343, 0, 65545, 1507347, 0, 65542, 1507348, 0, 65545, 1572878, 0, 65542, 1572879, 0, 65545, 1572883, 0, 65542, 1572884, 0, 65545, 1638414, 0, 65542, 1638415, 0, 65545, 1638419, 0, 65542, 1638420, 0, 65545, 1703950, 0, 131078, 1703951, 0, 131080, 1703955, 0, 131078, 1703956, 0, 131080, 1900544, 0, 0, 1900545, 0, 1, 1900546, 0, 1, 1900547, 0, 1, 1900548, 0, 1, 1900549, 0, 1, 1900550, 0, 1, 1900551, 0, 1, 1900552, 0, 1, 1900553, 0, 1, 1900554, 0, 1, 1900555, 0, 1, 1900556, 0, 1, 1900557, 0, 1, 1900558, 0, 1, 1900559, 0, 1, 1900560, 0, 1, 1900561, 0, 1, 1900562, 0, 1, 1900563, 0, 1, 1900564, 0, 1, 1900565, 0, 2 ) + +[node name="Flag" parent="." instance=ExtResource( 3 )] +position = Vector2( 602.469, 111.673 ) + +[node name="Character" parent="." instance=ExtResource( 2 )] +position = Vector2( 144.471, 115.947 ) + +[node name="Camera2D" type="Camera2D" parent="Character"] +current = true +zoom = Vector2( 0.5, 0.5 ) +limit_left = 0 +limit_top = 0 +limit_right = 700 +limit_bottom = 500 +drag_margin_h_enabled = true +drag_margin_v_enabled = true +editor_draw_limits = true |