-1

I want to implement the loop of my android game if some body could help me

I have loaded random images on image view.

Now i want to accelerate my image from bottom left of screen to center of screen making an angle of 45 degrees.after reaching the peek it should come down at the bottom right corner making 45 degrees angle..

my code is

int[] imageView = {
            R.id.imageV
            };

    int[] images ={
          R.drawable.image1,
          R.drawable.image2,
          R.drawable.image3,
          R.drawable.image4
         };

      Random rand=new Random();

      for(int v : imageView) {
            ImageView iv = (ImageView)findViewById(v);

            iv.setImageResource(images[rand.nextInt(images.length)]);

        }
Muhammad Asif Raza
  • 647
  • 2
  • 5
  • 24
  • 1
    Aside from loading the images have you tried to write any other code yourself? There are plenty of examples for animation and game development on Android – dymmeh Feb 16 '12 at 19:16
  • i have searched alot for this kind of loop but not yet succeded. can you please sort this out – Muhammad Asif Raza Feb 16 '12 at 19:24
  • Actually there's nothing more than logic implementation you need in this question. Stackoverflow is not really designed for users to ask each other to help them implement some logic that they can't (or don't want) to implement themselves. There is freelancer.com for such things. – Egor Feb 16 '12 at 21:40

1 Answers1

0

First check the docs, and try to make it by yourself. If you can't, come back with your code and we can help you to fix the error.

Basically you should make the view to run various animations (move and rotate) and add them in an animation set.

https://developer.android.com/guide/topics/graphics/animation.html

https://developer.android.com/guide/topics/resources/animation-resource.html

https://developer.android.com/reference/android/view/animation/package-summary.html

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Sebastián Castro
  • 1,408
  • 10
  • 28