mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-13 17:23:08 +00:00
30 lines
529 B
GDScript
30 lines
529 B
GDScript
class_name Layer3D
|
|
extends BaseLayer
|
|
## A class for 3D layer properties.
|
|
|
|
|
|
func _init(_project: Project, _name := "") -> void:
|
|
project = _project
|
|
name = _name
|
|
|
|
|
|
# Overridden Methods:
|
|
|
|
|
|
func serialize() -> Dictionary:
|
|
var dict = super.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()
|