on tap player ,player should jump in android game development?
<p>on tap player ,player should jump in android game development.help me how to do this with sample code.  </p>

<pre><code>public boolean onTouchEvent(MotionEvent event)
{
    if System.currentTimeMillis() - lastClick &gt; 300) 
    { 
        lastClick = System.currentTimeMillis();
        synchronized (getHolder()) 
        {
            for (int i = sprites.size()-1; i &gt;= 0; i--) 
            {             
                Sprite sprite = sprites.get(i); 
                float x=event.getX();float y=event.getY();         
                    if (sprite.isCollition(x,y))
                    {   
                        sprites.remove(sprite); 
                        temps.add(new TempSprite(temps, this, x, y, bmpBlood)); 
                        break;
                        }
                    }
            }
        }
    return super.onTouchEvent(event);
}
</code></pre>
