等级数据库

继承: Object

类别: 核心

简要说明

类信息存储库。

方法

bool

can_instance ( String class ) const

bool

class_exists ( String class ) const

String

class_get_category ( String class ) const

int

class_get_integer_constant ( String class, String name ) const

PoolStringArray

class_get_integer_constant_list ( String class, bool no_inheritance=false ) const

Array

class_get_method_list ( String class, bool no_inheritance=false ) const

Variant

class_get_property ( Object object, String property ) const

Array

class_get_property_list ( String class, bool no_inheritance=false ) const

Dictionary

class_get_signal ( String class, String signal ) const

Array

class_get_signal_list ( String class, bool no_inheritance=false ) const

bool

class_has_integer_constant ( String class, String name ) const

bool

class_has_method ( String class, String method, bool no_inheritance=false ) const

bool

class_has_signal ( String class, String signal ) const

Error

class_set_property ( Object object, String property, Variant value ) const

PoolStringArray

get_class_list ( ) const

PoolStringArray

get_inheriters_from_class ( String class ) const

String

get_parent_class ( String class ) const

Variant

instance ( String class ) const

bool

is_class_enabled ( String class ) const

bool

is_parent_class ( String class, String inherits ) const

描述

提供对为每个可用类存储的元数据的访问。

方法说明

返回 true 如果可以从指定的 classfalse 在其他情况下。

返回指定的 class 是否可用。

返回与类关联的类别,以在文档和资产库中使用。需要调试模式。

返回整数常量的值 name 属于 class 或者它的祖先。找不到常量时始终返回0。

返回一个数组,该数组的名称为 class 或者它的祖先。

  • Array class_get_method_list ( String class, bool no_inheritance=false ) const

返回一个数组,其中包含 class 或者它的祖先如果 no_inheritancefalse . 数组的每个元素都是 Dictionary 使用以下键: argsdefault_argsflagsidnamereturn: (class_name, hint, hint_string, name, type, usage) .

返回的值 property 属于 class 或者它的祖先。

  • Array class_get_property_list ( String class, bool no_inheritance=false ) const

返回具有以下所有属性的数组 class 或者它的祖先如果 no_inheritancefalse .

返回 signal 数据 class 或者它的祖先。返回值为 Dictionary 使用以下键: argsdefault_argsflagsidnamereturn: (class_name, hint, hint_string, name, type, usage) .

  • Array class_get_signal_list ( String class, bool no_inheritance=false ) const

返回一个数组,其中包含 class 或者它的祖先如果 no_inheritancefalse . 数组的每个元素都是 Dictionary 如上所述 class_get_signal .

是否返回 class 或者它的祖先有一个整型常量 name 或者没有。

是否返回 class (或其祖先,如果 no_inheritance 为false)有一个方法调用 method 或者没有。

是否返回 class 或者它的祖先有一个信号叫 signal 或者没有。

集合 property 价值 classvalue .

返回所有可用类的名称。

返回直接或间接继承自的所有类的名称 class .

返回的父类 class .

创建的实例 class .

返回该类是否已启用。

是否返回 inherits 是的祖先 class 或者没有。