Exemplo n.º 1
0
        private static void DefineSignalFromType(Godot.Object obj, Type type, SignalAttribute attr)
        {
            var name = string.IsNullOrEmpty(attr.SignalName) ? type.Name : attr.SignalName;

            if (!obj.HasUserSignal(name))
            {
                obj.AddUserSignal(name, attr.Arguments);
            }
        }
Exemplo n.º 2
0
 public static void AddSignal(Godot.Object o, string name, string[] names, int[] types)
 {
     Godot.Collections.Array arguments = new Godot.Collections.Array();
     for (int i = 0; i < names.Length; i++)
     {
         arguments.Add(new Godot.Collections.Dictionary {
             { "name", names[i] }, { "type", types[i] }
         });
     }
     o.AddUserSignal(name, arguments);
 }
Exemplo n.º 3
0
 public static void AddSignal(Godot.Object o, string name)
 {
     o.AddUserSignal(name);
 }