Android multi-touch. How exactly does it work

sp;      }  
        }  
    }  
      
    private boolean OnTouch(MotionEvent me)  
    {  
        int actionMask = me.getActionMasked();  
        int actionIndex = me.getActionIndex();  
        int x = getX(actionIndex);  
        int y = getY(actionIndex);  
              
        if(left.isEventInBounds(x, y))  
        {  
            handleLeftButtonPush(me);  
        }  
        else if (right.isEventInBounds(x, y))  
        {  
            handleRightButtonPush(me);  
        }  
 
        return true;  
    } 
Map<Integer, Button> knownPointerMap = new HashMap<Integer, Button>();

    private void goLeft()
    {
        renderer.setSpriteState('r', false);
        renderer.setSpriteState('l', true);
    }
   
    private void goRight()
    {
        renderer.setSpriteState('r', true);
        renderer.setSpriteState('l', false);
    }
   
    private void stopLeft()
    {
        renderer.setSpriteState('l', false);
       
        if (shouldGoRight()
        {
            goRight();
        }
    }
   
    private void stopRight()
    {
        renderer.setSpriteState('r', false);
       
        if (shouldGoLeft()
        {
   &n

Back  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... Next  >> 

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright