| 74 | } |
| 75 | |
| 76 | bool GDScriptNativeClass::_get(const StringName &p_name, Variant &r_ret) const { |
| 77 | bool ok; |
| 78 | int64_t v = ClassDB::get_integer_constant(name, p_name, &ok); |
| 79 | |
| 80 | if (ok) { |
| 81 | r_ret = v; |
| 82 | return true; |
| 83 | } |
| 84 | |
| 85 | MethodBind *method = ClassDB::get_method(name, p_name); |
| 86 | if (method && method->is_static()) { |
| 87 | // Native static method. |
| 88 | r_ret = Callable(this, p_name); |
| 89 | return true; |
| 90 | } |
| 91 | |
| 92 | return false; |
| 93 | } |
| 94 | |
| 95 | void GDScriptNativeClass::_bind_methods() { |
| 96 | ClassDB::bind_method(D_METHOD("new"), &GDScriptNativeClass::_new); |