diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2020-11-07 11:19:23 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2020-11-07 11:26:54 +0300 |
commit | 156e4043b400481ab01261353ee26ad7af9e3fb9 (patch) | |
tree | 8556788eb55f7284e95221a114e092026200f8ed /modules/mono/glue/collections_glue.cpp | |
parent | dfed88b11ff1a3315f1f276ff30cbaaf05e6d7b7 (diff) |
[Mono] Added Shuffle method to Array
Diffstat (limited to 'modules/mono/glue/collections_glue.cpp')
-rw-r--r-- | modules/mono/glue/collections_glue.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/mono/glue/collections_glue.cpp b/modules/mono/glue/collections_glue.cpp index 3313e8cb77..d98662f9ae 100644 --- a/modules/mono/glue/collections_glue.cpp +++ b/modules/mono/glue/collections_glue.cpp @@ -162,6 +162,10 @@ Error godot_icall_Array_Resize(Array *ptr, int new_size) { return ptr->resize(new_size); } +void godot_icall_Array_Shuffle(Array *ptr) { + ptr->shuffle(); +} + void godot_icall_Array_Generic_GetElementTypeInfo(MonoReflectionType *refltype, uint32_t *type_encoding, GDMonoClass **type_class) { MonoType *elem_type = mono_reflection_type_get_type(refltype); @@ -322,6 +326,7 @@ void godot_register_collections_icalls() { mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_Remove", (void *)godot_icall_Array_Remove); mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_RemoveAt", (void *)godot_icall_Array_RemoveAt); mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_Resize", (void *)godot_icall_Array_Resize); + mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_Shuffle", (void *)godot_icall_Array_Shuffle); mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_Generic_GetElementTypeInfo", (void *)godot_icall_Array_Generic_GetElementTypeInfo); mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_ToString", (void *)godot_icall_Array_ToString); |