Add static method support to ClassDB

* Based on the work done for Variant in the past.
* Added `ClassDB::bind_static_method`
* Cleaned up ClassDB::bind_method to use variadic templates.

This adds support for having static methods in Object derived classes.
Note that this does not make it work yet in GDScript or Mono and, while it works for GDExtension, GodotCPP needs to be updated.
This commit is contained in:
reduz
2022-03-19 13:18:52 +01:00
parent 81c2d7a82a
commit 2f651277da
7 changed files with 168 additions and 72 deletions

View File

@ -436,7 +436,7 @@ public:
void store_var(const Variant &p_var, bool p_full_objects = false);
bool file_exists(const String &p_name) const; // Return true if a file exists.
static bool file_exists(const String &p_name); // Return true if a file exists.
uint64_t get_modified_time(const String &p_file) const;