/** This class handles LightProperties for each side of PointLight. * @author realitix */ public static class PointLightProperties { public ObjectMap<CubemapSide, LightProperties> properties = new ObjectMap<CubemapSide, LightProperties>(6); }
/** Creates an empty properties set */ public MapProperties () { properties = new ObjectMap<String, Object>(); }
private EventManager() { mListeners = new ObjectMap<Integer, Array<Listener>>(); }
/** Load the properties from the specified reader. * * @param reader the reader * @throws IOException if an error occurred when reading from the input stream. */ // NOTE: // This method can't be private otherwise GWT can't access it from loadBundle() protected void load (Reader reader) throws IOException { properties = new ObjectMap<String, String>(); PropertiesUtils.load(properties, reader); }
public SaveData (ResourceData resources) { data = new ObjectMap<String, Object>(); assets = new IntArray(); loadIndex = 0; this.resources = resources; }
public SaveData () { data = new ObjectMap<String, Object>(); assets = new IntArray(); loadIndex = 0; }
public SaveData () { data = new ObjectMap<String, Object>(); assets = new IntArray(); loadIndex = 0; }
public void setAttribute (String name, String value) { if (attributes == null) attributes = new ObjectMap(8); attributes.put(name, value); }
public SaveData (ResourceData resources) { data = new ObjectMap<String, Object>(); assets = new IntArray(); loadIndex = 0; this.resources = resources; }
/** Load the properties from the specified reader. * * @param reader the reader * @throws IOException if an error occurred when reading from the input stream. */ // NOTE: // This method can't be private otherwise GWT can't access it from loadBundle() protected void load (Reader reader) throws IOException { properties = new ObjectMap<String, String>(); PropertiesUtils.load(properties, reader); }
public void add (String name, Object resource, Class type) { if (name == null) throw new IllegalArgumentException("name cannot be null."); if (resource == null) throw new IllegalArgumentException("resource cannot be null."); ObjectMap<String, Object> typeResources = resources.get(type); if (typeResources == null) { typeResources = new ObjectMap(type == TextureRegion.class || type == Drawable.class || type == Sprite.class ? 256 : 64); resources.put(type, typeResources); } typeResources.put(name, resource); }
public void add (String name, Object resource, Class type) { if (name == null) throw new IllegalArgumentException("name cannot be null."); if (resource == null) throw new IllegalArgumentException("resource cannot be null."); ObjectMap<String, Object> typeResources = resources.get(type); if (typeResources == null) { typeResources = new ObjectMap(type == TextureRegion.class || type == Drawable.class || type == Sprite.class ? 256 : 64); resources.put(type, typeResources); } typeResources.put(name, resource); }
public ResourceData () { uniqueData = new ObjectMap<String, SaveData>(); data = new Array<SaveData>(true, 3, SaveData.class); sharedAssets = new Array<AssetData>(); currentLoadIndex = 0; }
public ResourceData () { uniqueData = new ObjectMap<String, SaveData>(); data = new Array<SaveData>(true, 3, SaveData.class); sharedAssets = new Array<AssetData>(); currentLoadIndex = 0; }
/** Sets a new {@link AssetLoader} for the given type. * @param type the type of the asset * @param suffix the suffix the filename must have for this loader to be used or null to specify the default loader. * @param loader the loader */ public synchronized <T, P extends AssetLoaderParameters<T>> void setLoader (Class<T> type, String suffix, AssetLoader<T, P> loader) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (loader == null) throw new IllegalArgumentException("loader cannot be null."); log.debug("Loader set: " + ClassReflection.getSimpleName(type) + " -> " + ClassReflection.getSimpleName(loader.getClass())); ObjectMap<String, AssetLoader> loaders = this.loaders.get(type); if (loaders == null) this.loaders.put(type, loaders = new ObjectMap<String, AssetLoader>()); loaders.put(suffix == null ? "" : suffix, loader); }
/** Sets a new {@link AssetLoader} for the given type. * @param type the type of the asset * @param suffix the suffix the filename must have for this loader to be used or null to specify the default loader. * @param loader the loader */ public synchronized <T, P extends AssetLoaderParameters<T>> void setLoader (Class<T> type, String suffix, AssetLoader<T, P> loader) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (loader == null) throw new IllegalArgumentException("loader cannot be null."); log.debug("Loader set: " + ClassReflection.getSimpleName(type) + " -> " + ClassReflection.getSimpleName(loader.getClass())); ObjectMap<String, AssetLoader> loaders = this.loaders.get(type); if (loaders == null) this.loaders.put(type, loaders = new ObjectMap<String, AssetLoader>()); loaders.put(suffix == null ? "" : suffix, loader); }
/** Adds an asset to this AssetManager */ protected <T> void addAsset (final String fileName, Class<T> type, T asset) { // add the asset to the filename lookup assetTypes.put(fileName, type); // add the asset to the type lookup ObjectMap<String, RefCountedContainer> typeToAssets = assets.get(type); if (typeToAssets == null) { typeToAssets = new ObjectMap<String, RefCountedContainer>(); assets.put(type, typeToAssets); } typeToAssets.put(fileName, new RefCountedContainer(asset)); }
/** Adds an asset to this AssetManager */ protected <T> void addAsset (final String fileName, Class<T> type, T asset) { // add the asset to the filename lookup assetTypes.put(fileName, type); // add the asset to the type lookup ObjectMap<String, RefCountedContainer> typeToAssets = assets.get(type); if (typeToAssets == null) { typeToAssets = new ObjectMap<String, RefCountedContainer>(); assets.put(type, typeToAssets); } typeToAssets.put(fileName, new RefCountedContainer(asset)); }