Heck yeah, you punch those trees, Gary!
This commit is contained in:
9
terrain/terrain.gd
Normal file
9
terrain/terrain.gd
Normal file
@@ -0,0 +1,9 @@
|
||||
extends TileMapLayer
|
||||
|
||||
var dirt_id = 0
|
||||
var grass_id = 1
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.is_pressed():
|
||||
var coords: Vector2i = local_to_map(event.position)
|
||||
set_cell(coords, dirt_id, Vector2i.ZERO, 0)
|
||||
Reference in New Issue
Block a user