示例#1
0
 public SignalAwaiter(Object source, string signal, Object target)
 {
     NativeCalls.godot_icall_Object_connect_signal_awaiter(
         Object.GetPtr(source),
         signal, Object.GetPtr(target), this
         );
 }
示例#2
0
        public SignalAwaiter(Object source, StringName signal, Object target)
        {
            var awaiterGcHandle = CustomGCHandle.AllocStrong(this);

            using godot_string_name signalSrc = NativeFuncs.godotsharp_string_name_new_copy(
                      (godot_string_name)(signal?.NativeValue ?? default));
            NativeFuncs.godotsharp_internal_signal_awaiter_connect(Object.GetPtr(source), in signalSrc,
                                                                   Object.GetPtr(target), GCHandle.ToIntPtr(awaiterGcHandle));
        }
示例#3
0
        /// <inheritdoc/>
        public override bool TrySetIndex(SetIndexBinder binder, object[] indexes, object value)
        {
            if (indexes.Length == 1)
            {
                if (indexes[0] is string name)
                {
                    return(godot_icall_DynamicGodotObject_SetMember(Object.GetPtr(Value), name, value));
                }
            }

            return(base.TrySetIndex(binder, indexes, value));
        }
示例#4
0
 public RID(Object from)
 {
     this.ptr = godot_icall_RID_Ctor(Object.GetPtr(from));
 }
示例#5
0
 public SignalAwaiter(Object source, string signal, Object target)
 {
     godot_icall_SignalAwaiter_connect(Object.GetPtr(source), signal, Object.GetPtr(target), this);
 }
示例#6
0
 public SignalAwaiter(Object source, StringName signal, Object target)
 {
     godot_icall_SignalAwaiter_connect(Object.GetPtr(source), StringName.GetPtr(signal), Object.GetPtr(target), this);
 }
示例#7
0
 /// <inheritdoc/>
 public override IEnumerable <string> GetDynamicMemberNames()
 {
     return(godot_icall_DynamicGodotObject_SetMemberList(Object.GetPtr(Value)));
 }
示例#8
0
 /// <inheritdoc/>
 public override bool TrySetMember(SetMemberBinder binder, object value)
 {
     return(godot_icall_DynamicGodotObject_SetMember(Object.GetPtr(Value), binder.Name, value));
 }
示例#9
0
 /// <inheritdoc/>
 public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
 {
     return(godot_icall_DynamicGodotObject_InvokeMember(Object.GetPtr(Value), binder.Name, args, out result));
 }
示例#10
0
 /// <inheritdoc/>
 public override bool TryGetMember(GetMemberBinder binder, out object result)
 {
     return(godot_icall_DynamicGodotObject_GetMember(Object.GetPtr(Value), binder.Name, out result));
 }
示例#11
0
 public static WeakRef WeakRef(Object obj)
 {
     return(NativeCalls.godot_icall_Godot_weakref(Object.GetPtr(obj)));
 }
 public Array <T> GetNodesInGroup <T>(StringName group) where T : class
 {
     return(new Array <T>(godot_icall_SceneTree_get_nodes_in_group_Generic(Object.GetPtr(this), StringName.GetPtr(group), typeof(T))));
 }
示例#13
0
 public static WeakRef WeakRef(Object obj)
 {
     return(godot_icall_Object_weakref(Object.GetPtr(obj)));
 }