private static long create(Map<String, ?> textures) { NSDictionary<NSString, ?> properties = new NSMutableDictionary<>(); for (Map.Entry<String, ?> entry : textures.entrySet()) { NSString key = new NSString(entry.getKey()); NSObject value = null; if (entry.getValue() instanceof String) { value = new NSString((String)entry.getValue()); } else if (entry.getValue() instanceof NSURL || entry.getValue() instanceof UIImage || entry.getValue() instanceof NSString) { value = (NSObject)entry.getValue(); } else { throw new IllegalArgumentException("Only String, NSURL, UIImage or NSString are allowed!"); } properties.put(key, value); } return create(properties); } /*<properties>*/
/** * Constructs a new texture atlas object from the specified texture files. * @param properties The keys of this map represent the texture names. * The associated values can be of type String, NSURL or UIImage. * @return * @since Available in iOS 8.0 and later. */ public SKTextureAtlas(Map<String, ?> textures) { super(create(textures)); retain(getHandle()); }
public SKTextureAtlas(String name) { super(create(name)); retain(getHandle()); } public SKTextureAtlas(NSCoder aDecoder) { super((SkipInit) null); initObject(init(aDecoder)); }
/** * Constructs a new texture atlas object from the specified texture files. * @param properties The keys of this map represent the texture names. * The associated values can be of type String, NSURL or UIImage. * @return * @since Available in iOS 8.0 and later. */ public SKTextureAtlas(Map<String, ?> textures) { super(create(textures)); retain(getHandle()); }
private static long create(Map<String, ?> textures) { NSDictionary<NSString, ?> properties = new NSMutableDictionary<>(); for (Map.Entry<String, ?> entry : textures.entrySet()) { NSString key = new NSString(entry.getKey()); NSObject value = null; if (entry.getValue() instanceof String) { value = new NSString((String)entry.getValue()); } else if (entry.getValue() instanceof NSURL || entry.getValue() instanceof UIImage || entry.getValue() instanceof NSString) { value = (NSObject)entry.getValue(); } else { throw new IllegalArgumentException("Only String, NSURL, UIImage or NSString are allowed!"); } properties.put(key, value); } return create(properties); } /*<properties>*/
/** * Constructs a new texture atlas object from the specified texture files. * @param properties The keys of this map represent the texture names. * The associated values can be of type String, NSURL or UIImage. * @return * @since Available in iOS 8.0 and later. */ public SKTextureAtlas(Map<String, ?> textures) { super(create(textures)); retain(getHandle()); }
private static long create(Map<String, ?> textures) { NSDictionary<NSString, ?> properties = new NSMutableDictionary<>(); for (Map.Entry<String, ?> entry : textures.entrySet()) { NSString key = new NSString(entry.getKey()); NSObject value = null; if (entry.getValue() instanceof String) { value = new NSString((String)entry.getValue()); } else if (entry.getValue() instanceof NSURL || entry.getValue() instanceof UIImage || entry.getValue() instanceof NSString) { value = (NSObject)entry.getValue(); } else { throw new IllegalArgumentException("Only String, NSURL, UIImage or NSString are allowed!"); } properties.put(key, value); } return create(properties); } /*<properties>*/
public SKTextureAtlas(String name) { super((Handle) null, create(name)); retain(getHandle()); } @Method(selector = "initWithCoder:")
public SKTextureAtlas(String name) { super((Handle) null, create(name)); retain(getHandle()); } @Method(selector = "initWithCoder:")