21Inheritance
继承scene
顶部菜单 scene - New Inheritance scene,在弹出的对话框选择要继承的scene
scene脚步继承(默认子scene附属的 GDScript还是父scene的GDScript):
- ①.给父scene添加
class_name
(比如class_name LevelParent
) - ②.子scene添加附属自己的场景, 且子scene的GdScript
extends
父scene的class_name
(比如extends LevelParent
)
This post is licensed under CC BY 4.0 by the author.