Android Open Source - RubeLoader Rube Scene Sync Loader






From Project

Back to project page RubeLoader.

License

The source code is released under:

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUC...

If you think the Android project RubeLoader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.gushikustudios.rube.loader;
//from  w  w  w.j  a  v a 2 s  . c  o m
import com.badlogic.gdx.assets.AssetDescriptor;
import com.badlogic.gdx.assets.AssetLoaderParameters;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.assets.loaders.FileHandleResolver;
import com.badlogic.gdx.assets.loaders.SynchronousAssetLoader;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.physics.box2d.World;
import com.badlogic.gdx.utils.Array;
import com.gushikustudios.rube.RubeScene;

public class RubeSceneSyncLoader extends SynchronousAssetLoader<RubeScene, RubeSceneSyncLoader.RubeSceneParameters>
{
   private final RubeSceneLoader mLoader;
   
   static public class RubeSceneParameters extends AssetLoaderParameters<RubeScene>
   {
      // TODO: Add any special parameter definitions here
   }
   
   public RubeSceneSyncLoader(FileHandleResolver resolver)
   {
      this(null,resolver);
   }
   
   /**
    * Specifies a pre-defined Box2D world to add scene objects to.
    * 
    * @param world
    * @param resolver
    */
   public RubeSceneSyncLoader(World world, FileHandleResolver resolver)
   {
      super(resolver);
      mLoader = new RubeSceneLoader(world);
   }

   @Override
   public RubeScene load(AssetManager assetManager, String fileName, FileHandle file, RubeSceneParameters parameter)
   {
      return mLoader.addScene(file);
   }

   @SuppressWarnings("rawtypes")
   @Override
   public Array<AssetDescriptor> getDependencies(String fileName, FileHandle file, RubeSceneParameters parameter)
   {
      return null;
   }
}




Java Source Code List

com.gushikustudios.rube.MainActivity.java
com.gushikustudios.rube.PolySpatial.java
com.gushikustudios.rube.PolySpatial.java
com.gushikustudios.rube.RubeDefaults.java
com.gushikustudios.rube.RubeLoaderTestDesktop.java
com.gushikustudios.rube.RubeLoaderTestDesktop.java
com.gushikustudios.rube.RubeLoaderTest.java
com.gushikustudios.rube.RubeLoaderTest.java
com.gushikustudios.rube.RubeScene.java
com.gushikustudios.rube.SimpleSpatial.java
com.gushikustudios.rube.SimpleSpatial.java
com.gushikustudios.rube.loader.RubeSceneAsyncLoader.java
com.gushikustudios.rube.loader.RubeSceneLoader.java
com.gushikustudios.rube.loader.RubeSceneSyncLoader.java
com.gushikustudios.rube.loader.serializers.BodySerializer.java
com.gushikustudios.rube.loader.serializers.FixtureSerializer.java
com.gushikustudios.rube.loader.serializers.ImageSerializer.java
com.gushikustudios.rube.loader.serializers.JointSerializer.java
com.gushikustudios.rube.loader.serializers.RubeWorldSerializer.java
com.gushikustudios.rube.loader.serializers.Vector2Serializer.java
com.gushikustudios.rube.loader.serializers.WorldSerializer.java
com.gushikustudios.rube.loader.serializers.utils.RubeImage.java
com.gushikustudios.rube.loader.serializers.utils.RubeVertexArray.java