Example #1
0
 /**
  * Creates a BunnyMark with a certain number of Wabbits.
  *
  * @param count
  * The number of wabbits.
  * @param rect
  * You can define a rectangle for the borders of the BunnyMark. If you don't specify the rectangle the complete stage will be used.
  */
 public BunnyMarkSimple(int count = 100, Rectangle rect = null)
 {
     Touchable = false;
     mCount    = count;
     if (rect != null)
     {
         mRectangle = rect;
     }
     mTexture      = SimpleTextureLoader.LoadAndroidResource(SparrowSharp.Samples.Android.Resource.Drawable.wabbit_alpha);
     AddedToStage += AddedToStageHandler;
 }
Example #2
0
        public Benchmark()
        {
            GLTexture star    = SimpleTextureLoader.LoadAndroidResource(SparrowSharp.Samples.Android.Resource.Drawable.star);
            GLTexture bird    = SimpleTextureLoader.LoadAndroidResource(SparrowSharp.Samples.Android.Resource.Drawable.benchmark_object);
            GLTexture bigstar = SimpleTextureLoader.LoadAndroidResource(SparrowSharp.Samples.Android.Resource.Drawable.bigstar);

            textures = new Texture[] { bird, bigstar, star };


            // the container will hold all test objects
            _container = new Sprite();
            AddChild(_container);

            EnterFrame   += EnterFrameHandler;
            AddedToStage += AddedToStageHandler;
        }