Created super simple fog-of-war system
parent
bbe9292d72
commit
d8b251c8e0
|
|
@ -0,0 +1,15 @@
|
|||
extends TileMapLayer
|
||||
|
||||
@export var player_grid: GridPosition
|
||||
|
||||
func _process(_delta: float):
|
||||
for y in [-1, 0, 1]:
|
||||
for x in [-1, 0, 1]:
|
||||
reveal_tile(player_grid.get_coords() + Vector2i(x, y))
|
||||
#reveal_tile(player_grid.get_coords() + Vector2i(2, 0))
|
||||
#reveal_tile(player_grid.get_coords() + Vector2i(-2, 0))
|
||||
#reveal_tile(player_grid.get_coords() + Vector2i(0, 2))
|
||||
#reveal_tile(player_grid.get_coords() + Vector2i(0, -2))
|
||||
|
||||
func reveal_tile(coords: Vector2i):
|
||||
set_cell(coords, 1, Vector2i(1, 7), 0)
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://bbybsp6yyxh07
|
||||
|
|
@ -26,3 +26,4 @@ not_picked = NodePath("../Not Picked")
|
|||
[node name="Grow" type="Node" parent="." node_paths=PackedStringArray("gatherable")]
|
||||
script = ExtResource("4_17ku8")
|
||||
gatherable = NodePath("../Gatherable")
|
||||
days_to_grow = 2
|
||||
|
|
|
|||
|
|
@ -27,3 +27,4 @@ not_picked = NodePath("../Not Picked")
|
|||
[node name="Grow" type="Node" parent="." node_paths=PackedStringArray("gatherable")]
|
||||
script = ExtResource("4_y3wpw")
|
||||
gatherable = NodePath("../Gatherable")
|
||||
days_to_grow = 2
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.5 KiB |
|
|
@ -1,13 +0,0 @@
|
|||
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://7lfy0ix4n65n"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://doscvutq8uqmd" path="res://sprites/sheet.png" id="1_1tjj6"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_yenu7"]
|
||||
texture = ExtResource("1_1tjj6")
|
||||
texture_region_size = Vector2i(32, 32)
|
||||
0:0/0 = 0
|
||||
1:0/0 = 0
|
||||
|
||||
[resource]
|
||||
tile_size = Vector2i(32, 32)
|
||||
sources/0 = SubResource("TileSetAtlasSource_yenu7")
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://bvb03h5b05kro"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://doscvutq8uqmd" path="res://sprites/sheet.png" id="1_ew2fx"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ew2fx"]
|
||||
texture = ExtResource("1_ew2fx")
|
||||
texture_region_size = Vector2i(32, 32)
|
||||
0:7/0 = 0
|
||||
1:7/0 = 0
|
||||
|
||||
[resource]
|
||||
tile_size = Vector2i(32, 32)
|
||||
sources/1 = SubResource("TileSetAtlasSource_ew2fx")
|
||||
Loading…
Reference in New Issue