diff options
author | Victor Andrade de Almeida <vct.a.almeida@gmail.com> | 2022-07-17 02:58:01 -0300 |
---|---|---|
committer | Victor Andrade de Almeida <vct.a.almeida@gmail.com> | 2022-07-17 02:58:13 -0300 |
commit | 8d61124b3dbeacbf71f0b5a2a53dc7f53e88a310 (patch) | |
tree | d36a196ea0ad980bcb58308a66dd907f227d04c8 | |
parent | 9796ffe09423c849430929a509f6615a9f8f5106 (diff) | |
download | gamejam-gmtk-2022-8d61124b3dbeacbf71f0b5a2a53dc7f53e88a310.tar.gz gamejam-gmtk-2022-8d61124b3dbeacbf71f0b5a2a53dc7f53e88a310.tar.bz2 gamejam-gmtk-2022-8d61124b3dbeacbf71f0b5a2a53dc7f53e88a310.zip |
Fix ground
-rw-r--r-- | Scenes/Builder.gd | 5 | ||||
-rw-r--r-- | Scenes/Dungeon.tscn | 19 | ||||
-rw-r--r-- | Scenes/Ground.tscn | 19 |
3 files changed, 27 insertions, 16 deletions
diff --git a/Scenes/Builder.gd b/Scenes/Builder.gd index b0d4166..8413e6e 100644 --- a/Scenes/Builder.gd +++ b/Scenes/Builder.gd @@ -1,5 +1,6 @@ extends Node +const Ground = preload("res://Scenes/Ground.tscn") const Obstacle = preload("res://Scenes/Obstacle.tscn") const Crystal = preload("res://Scenes/Crystal.tscn") @@ -92,6 +93,10 @@ func build(player : Entity, dungeon): var length = room_size + 1 var corner = key * length + var ground = Ground.instance() + dungeon.add_child(ground) + ground.translation = dungeon.tile_to_pos(corner + Vector2.ONE / 2) + for i in range(0, length): if not rooms.has(key + Vector2(-1, 0)): build_obstacle(corner + Vector2(0, i), dungeon) diff --git a/Scenes/Dungeon.tscn b/Scenes/Dungeon.tscn index 4bbacd1..072dc0f 100644 --- a/Scenes/Dungeon.tscn +++ b/Scenes/Dungeon.tscn @@ -1,26 +1,18 @@ -[gd_scene load_steps=16 format=2] +[gd_scene load_steps=13 format=2] [ext_resource path="res://Scenes/Dungeon.gd" type="Script" id=1] [ext_resource path="res://Scenes/CameraControl.gd" type="Script" id=2] -[ext_resource path="res://Assets/Environment/Floor_tile.png" type="Texture" id=3] [ext_resource path="res://Scenes/UIController.gd" type="Script" id=4] [ext_resource path="res://Assets/AlegreyaSansSC-ExtraBold.ttf" type="DynamicFontData" id=5] [ext_resource path="res://Scenes/ScoreParticle.tscn" type="PackedScene" id=6] [ext_resource path="res://Assets/arm.png" type="Texture" id=7] -[sub_resource type="PlaneMesh" id=1] - -[sub_resource type="SpatialMaterial" id=4] -albedo_color = Color( 0.694118, 0.505882, 0.666667, 1 ) -albedo_texture = ExtResource( 3 ) -uv1_scale = Vector3( 12, 12, 1 ) -uv1_offset = Vector3( 0.25, 0.25, 1 ) - [sub_resource type="ProceduralSky" id=2] [sub_resource type="Environment" id=3] -background_mode = 2 +background_mode = 1 background_sky = SubResource( 2 ) +background_color = Color( 0.1, 0.1, 0.1, 1 ) ambient_light_color = Color( 1, 1, 1, 1 ) dof_blur_far_amount = 0.06 @@ -70,11 +62,6 @@ tracks/0/keys = { [node name="Dungeon" type="Spatial"] script = ExtResource( 1 ) -[node name="Floor" type="MeshInstance" parent="."] -transform = Transform( 12, 0, 0, 0, 1, 0, 0, 0, 12, 0, 0, 0 ) -mesh = SubResource( 1 ) -material/0 = SubResource( 4 ) - [node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = SubResource( 3 ) diff --git a/Scenes/Ground.tscn b/Scenes/Ground.tscn new file mode 100644 index 0000000..60c9e11 --- /dev/null +++ b/Scenes/Ground.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Assets/Environment/Floor_tile.png" type="Texture" id=1] + +[sub_resource type="PlaneMesh" id=1] +size = Vector2( 1, 1 ) + +[sub_resource type="SpatialMaterial" id=4] +albedo_color = Color( 0.694118, 0.505882, 0.666667, 1 ) +albedo_texture = ExtResource( 1 ) +uv1_scale = Vector3( 3.5, 3.5, 1 ) +uv1_offset = Vector3( 0, 0, 1 ) + +[node name="Spatial" type="Spatial"] + +[node name="Ground" type="MeshInstance" parent="."] +transform = Transform( 7, 0, 0, 0, 1, 0, 0, 0, 7, 3.5, 0, -3.5 ) +mesh = SubResource( 1 ) +material/0 = SubResource( 4 ) |