Exemplo n.º 1
0
        GameObjectExtension TryGetExtension(IntPtr handle)
        {
            if (handle == IntPtr.Zero)
            {
                return(null);
            }

            var extension = Extensions.FirstOrDefault(x => x.Handle == handle);

            if (extension == null)
            {
                extension        = new GameObjectExtension();
                extension.Handle = handle;
                extension.Owner  = this;

                Extensions.Add(extension);
            }

            return(extension);
        }
Exemplo n.º 2
0
        GameObjectExtension TryGetExtension(IntPtr handle)
        {
            if (handle == IntPtr.Zero)
                return null;

            var extension = Extensions.FirstOrDefault(x => x.Handle == handle);
            if (extension == null)
            {
                extension = new GameObjectExtension();
                extension.Handle = handle;
                extension.Owner = this;

                Extensions.Add(extension);
            }

            return extension;
        }