Use a new Layer class to handle layer information

This replaces the old Global.layers nested array mess, and makes the code easier to read and to understand.
This commit is contained in:
OverloadedOrama 2020-06-01 16:42:53 +03:00
parent 1762383c6b
commit a9ca858303
13 changed files with 100 additions and 86 deletions

View file

@ -20,7 +20,7 @@ func _ready() -> void:
func _process(_delta : float) -> void:
if Global.layers[Global.current_layer][2]:
if Global.layers[Global.current_layer].locked:
return
var mouse_pos: Vector2 = get_local_mouse_position() - Global.canvas.location
var mouse_pos_floored := mouse_pos.floor()