Example #1
0
    //list of game objects to notify
    //prevent from reaction on buttons - tag as interface
    //move = distance, speed

    void Start()
    {
        for (int i = 0; i < 5; i++)
        {
            ExtTouches[i] = new TouchExt();
        }

        if (swipeDetectionCoef == 0)
        {
            swipeDetectionCoef = 1;
        }

        Vector2 diagonal = new Vector2(Screen.width, Screen.height);

        swipeDelta = (int)Mathf.Round(diagonal.magnitude / 10);
    }
Example #2
0
 void Awake()
 {
     instance = this;
 }