Inheritance: Image
Exemplo n.º 1
0
 private void AddBunny()
 {
     mBunny = new Bunny(mTexture);
     mBunny.SpeedX = (float)random.NextDouble() * 5;
     mBunny.SpeedY = (float)random.NextDouble() * 5 - 2.5f;
     mBunny.ScaleX = mBunny.ScaleY = (float)random.NextDouble() + 0.3f; 
     mBunny.Rotation = (float)random.NextDouble() * 30 - 15;
     AddChild(mBunny);
     mBunnies.Add(mBunny);
 }
Exemplo n.º 2
0
 private void AddBunny()
 {
     mBunny          = new Bunny(mTexture);
     mBunny.SpeedX   = (float)random.NextDouble() * 5;
     mBunny.SpeedY   = (float)random.NextDouble() * 5 - 2.5f;
     mBunny.ScaleX   = mBunny.ScaleY = (float)random.NextDouble() + 0.3f;
     mBunny.Rotation = (float)random.NextDouble() * 30 - 15;
     AddChild(mBunny);
     mBunnies.Add(mBunny);
 }
Exemplo n.º 3
0
 private void RemoveBunny()
 {
     if (mBunnies.Count > 0)
     {
         mBunny = mBunnies[mBunnies.Count - 1];
         mBunnies.RemoveAt(mBunnies.Count - 1);
         if (mBunny != null)
         {
             mBunny.Parent.RemoveChild(mBunny);
         }
     }
 }
Exemplo n.º 4
0
 private void RemoveBunny() 
 {
     if (mBunnies.Count > 0){
         mBunny = mBunnies[mBunnies.Count - 1];
         mBunnies.RemoveAt(mBunnies.Count - 1);
         if (mBunny != null) {
             mBunny.Parent.RemoveChild(mBunny);
         }
     }
 }