Class SKTextureAtlas

All Implemented Interfaces:
NSCoding, NSObjectProtocol, NSSecureCoding, ObjCProtocol

public class SKTextureAtlas
extends NSObject
implements NSSecureCoding
  • Constructor Details

    • SKTextureAtlas

      public SKTextureAtlas()
    • SKTextureAtlas

      protected SKTextureAtlas​(NSObject.Handle h, long handle)
    • SKTextureAtlas

      protected SKTextureAtlas​(NSObject.SkipInit skipInit)
    • SKTextureAtlas

      public SKTextureAtlas​(String name)
    • SKTextureAtlas

      public SKTextureAtlas​(NSCoder coder)
    • SKTextureAtlas

      public SKTextureAtlas​(Map<String,​?> textures)
      Constructs a new texture atlas object from the specified texture files.
      Parameters:
      properties - The keys of this map represent the texture names. The associated values can be of type String, NSURL or UIImage.
      Since:
      Available in iOS 8.0 and later.
  • Method Details

    • getTextureNames

      public List<String> getTextureNames()
    • supportsSecureCoding

      public static boolean supportsSecureCoding()
    • getTexture

      public SKTexture getTexture​(String name)
    • preload

      public void preload​(Runnable completionHandler)
    • create

      protected static long create​(String name)
    • create

      protected static long create​(NSDictionary<NSString,​?> properties)
    • preloadTextureAtlases

      public static void preloadTextureAtlases​(NSArray<SKTextureAtlas> textureAtlases, Runnable completionHandler)
    • preloadTextureAtlases

      public static void preloadTextureAtlases​(List<String> atlasNames, VoidBlock2<NSError,​NSArray<SKTextureAtlas>> completionHandler)
      Since:
      Available in iOS 9.0 and later.
    • encode

      public void encode​(NSCoder coder)
      Specified by:
      encode in interface NSCoding
    • init

      protected long init​(NSCoder coder)