mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-18 19:43:14 +00:00
33 lines
571 B
GDScript3
33 lines
571 B
GDScript3
|
class_name Layer3D
|
||
|
extends BaseLayer
|
||
|
|
||
|
|
||
|
func _init(_project, _name := "") -> void:
|
||
|
project = _project
|
||
|
name = _name
|
||
|
|
||
|
|
||
|
# Overridden Methods:
|
||
|
|
||
|
|
||
|
func serialize() -> Dictionary:
|
||
|
var dict = .serialize()
|
||
|
dict["type"] = get_layer_type()
|
||
|
return dict
|
||
|
|
||
|
|
||
|
func get_layer_type() -> int:
|
||
|
return Global.LayerTypes.THREE_D
|
||
|
|
||
|
|
||
|
func new_empty_cel() -> BaseCel:
|
||
|
return Cel3D.new(project.size)
|
||
|
|
||
|
|
||
|
func can_layer_get_drawn() -> bool:
|
||
|
return is_visible_in_hierarchy() && !is_locked_in_hierarchy()
|
||
|
|
||
|
|
||
|
func instantiate_layer_button() -> Node:
|
||
|
return Global.base_layer_button_node.instance()
|