Beispiel #1
0
        public SceneObject(Context context, String fileName, String shaderName, SceneRender render, int textureResID, int texture2ResID, int texture3ResID)
        {
            if (context == null)
            {
                return;
            }

            if (fileName != "")
            {
                this.context       = context;
                this.render        = render;
                this.fileName      = fileName;
                this.shaderName    = shaderName;
                this.textureResID  = textureResID;
                this.texture2ResID = texture2ResID;
                this.texture3ResID = texture3ResID;
                initShader();
            }
            else
            {
                this.context       = context;
                this.render        = render;
                this.fileName      = "";
                this.textureResID  = -1;
                this.texture2ResID = -1;
                this.texture3ResID = -1;
            }

            ObjectManager.add(this);
        }
Beispiel #2
0
 public static void createObjects()
 {
     TextureManager.clearTextures();
     ShaderManager.clear();
     VBOManager.clearVBO();
     render = new SceneRender();
     render.CreateObjects(1);
 }
Beispiel #3
0
        public Boat(Context context, String fileName, String shaderName, SceneRender render, int textureResID, int texture2ResID, int texture3ResID)
            : base(context, fileName, shaderName, render, textureResID, texture2ResID, texture3ResID)
        {
            //super (context, fileName, shaderName, render, textureResID, texture2ResID, texture3ResID);
            levelScale = true;

            /*
             * for (int i = 0; i < 20; i++)
             * {
             *   SmokeItem smokeItem = new SmokeItem();
             *   smokeItems.add(smokeItem);
             * }
             */

            //smokeObj = new SceneObject(context, "smoke_obj", "water", render, R.drawable.smoke, R.drawable.smoke, R.drawable.smoke);
            //smokeObj.parentDraw = true;
            //smokeObj.blendType = 1;
            //smokeObj.blend = GlobalVar.blendYes;

            //SoundManager.Add("boat", Sound.diselonSoundID);
            //SoundManager.Play("boat", 0.0f,  0.0f, true);

            //streamOnID = Sound.soundPool.play(Sound.diselonSoundID, 0.0f, 0.0f, 1, -1, 1.0f);
        }
Beispiel #4
0
        public static Circle FactoryCircle(Context context, int steps, String shaderName, SceneRender render)
        {
            int    textureResID  = -1;
            int    texture2ResID = -1;
            int    texture3ResID = -1;
            string fileName      = "Circle";

            Circle.steps = steps;
            Circle circle = new Circle(context, fileName, shaderName, render, textureResID, texture2ResID, texture3ResID);

            return(circle);
        }
Beispiel #5
0
 public Circle(Context context, String fileName, String shaderName, SceneRender render, int textureResID, int texture2ResID, int texture3ResID)
     : base(context, fileName, shaderName, render, textureResID, texture2ResID, texture3ResID)
 {
     levelScale = true;
 }