summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tuomi <jan.tuomi@valuemotive.com>2020-07-30 00:02:24 +0300
committerJan Tuomi <jan.tuomi@valuemotive.com>2020-07-30 00:02:24 +0300
commitb702a3c809225c4e684639cd33762b06e5b2142b (patch)
tree80ce78f2f31e2fd112d66cf2591379a195b53b55
parente39c090fa38e4e9faa895d7933f041b8f8a8e5c0 (diff)
Put in a light
-rw-r--r--externals/point_light.pngbin0 -> 36896 bytes
-rw-r--r--externals/point_light.png.import34
-rw-r--r--scenes/Scene1.tscn82
3 files changed, 114 insertions, 2 deletions
diff --git a/externals/point_light.png b/externals/point_light.png
new file mode 100644
index 0000000..61cd9ca
--- /dev/null
+++ b/externals/point_light.png
Binary files differ
diff --git a/externals/point_light.png.import b/externals/point_light.png.import
new file mode 100644
index 0000000..35dc7f4
--- /dev/null
+++ b/externals/point_light.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/point_light.png-e932043e72e0746d35f601d678b23da9.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://externals/point_light.png"
+dest_files=[ "res://.import/point_light.png-e932043e72e0746d35f601d678b23da9.stex" ]
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+process/invert_color=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/scenes/Scene1.tscn b/scenes/Scene1.tscn
index 4b37eba..d54a2f8 100644
--- a/scenes/Scene1.tscn
+++ b/scenes/Scene1.tscn
@@ -1,9 +1,76 @@
-[gd_scene load_steps=28 format=2]
+[gd_scene load_steps=51 format=2]
[ext_resource path="res://scenes/PlayerCharacter.tscn" type="PackedScene" id=1]
[ext_resource path="res://textures/world_tileset.tres" type="Texture" id=2]
[ext_resource path="res://scenes/DwarfNPC.tscn" type="PackedScene" id=3]
[ext_resource path="res://scripts/Scene1.gd" type="Script" id=4]
+[ext_resource path="res://externals/point_light.png" type="Texture" id=5]
+
+[sub_resource type="OccluderPolygon2D" id=27]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=34]
+polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=35]
+polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=26]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=36]
+polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 )
+
+[sub_resource type="OccluderPolygon2D" id=37]
+polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 )
+
+[sub_resource type="OccluderPolygon2D" id=28]
+polygon = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 )
+
+[sub_resource type="OccluderPolygon2D" id=29]
+polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=30]
+polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=31]
+polygon = PoolVector2Array( 0, 8, 4, 8, 4, 4, 0, 4 )
+
+[sub_resource type="OccluderPolygon2D" id=32]
+polygon = PoolVector2Array( 0, 8, 4, 8, 4, 0, 0, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=33]
+polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 )
+
+[sub_resource type="OccluderPolygon2D" id=38]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=39]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=40]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=41]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=42]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=43]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=44]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=45]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=46]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=47]
+polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
[sub_resource type="ConvexPolygonShape2D" id=1]
points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
@@ -81,7 +148,7 @@ points = PoolVector2Array( 4, 4, 4, 0, 8, 0, 8, 8, 0, 8, 0, 4 )
0/autotile/icon_coordinate = Vector2( 0, 0 )
0/autotile/tile_size = Vector2( 8, 8 )
0/autotile/spacing = 0
-0/autotile/occluder_map = [ ]
+0/autotile/occluder_map = [ Vector2( 0, 0 ), SubResource( 27 ), Vector2( 0, 1 ), SubResource( 34 ), Vector2( 0, 2 ), SubResource( 35 ), Vector2( 1, 0 ), SubResource( 26 ), Vector2( 1, 1 ), SubResource( 36 ), Vector2( 1, 2 ), SubResource( 37 ), Vector2( 2, 0 ), SubResource( 28 ), Vector2( 2, 1 ), SubResource( 29 ), Vector2( 2, 2 ), SubResource( 30 ), Vector2( 3, 0 ), SubResource( 31 ), Vector2( 3, 1 ), SubResource( 32 ), Vector2( 3, 2 ), SubResource( 33 ), Vector2( 4, 0 ), SubResource( 38 ), Vector2( 4, 1 ), SubResource( 39 ), Vector2( 4, 2 ), SubResource( 40 ), Vector2( 5, 0 ), SubResource( 41 ), Vector2( 5, 1 ), SubResource( 42 ), Vector2( 5, 2 ), SubResource( 43 ), Vector2( 6, 1 ), SubResource( 44 ), Vector2( 6, 2 ), SubResource( 45 ), Vector2( 7, 1 ), SubResource( 46 ), Vector2( 7, 2 ), SubResource( 47 ) ]
0/autotile/navpoly_map = [ ]
0/autotile/priority_map = [ ]
0/autotile/z_index_map = [ ]
@@ -244,6 +311,17 @@ tile_data = PoolIntArray( -262152, 0, 0, -262151, 0, 0, -262150, 0, 0, -262149,
position = Vector2( 11.3538, 19.871 )
speed = 32
+[node name="Light2D" type="Light2D" parent="YSort/PlayerCharacter"]
+position = Vector2( 0.175415, 0.17543 )
+rotation = 3.14159
+texture = ExtResource( 5 )
+texture_scale = 2.54
+color = Color( 0.866667, 0.886275, 0.705882, 1 )
+energy = 1.2
+mode = 2
+shadow_color = Color( 0.184314, 0.215686, 0.176471, 0 )
+shadow_filter = 1
+
[node name="DwarfNPC" parent="YSort" instance=ExtResource( 3 )]
position = Vector2( 51.6174, 19.3117 )
target = NodePath("../PlayerCharacter")