Esempio n. 1
0
    void Select(Direction direction)
    {
        switch (direction)
        {
        case Direction.Up:
            Main.ChangeColor(Color.white);
            break;

        case Direction.Down:
            Main.ChangeColor(Color.green);
            break;

        case Direction.Right:
            Main.ChangeColor(Color.red);
            break;

        case Direction.Left:
            Main.ChangeColor(Color.blue);
            break;

        case Direction.Touch:
            if (touchflag)
            {
                pause.SetActive(true);
                Time.timeScale         = 0f;
                DrawLine.Instance.Draw = false;
            }
            else
            {
                touchflag = true;
                Invoke("tap", 0.3f);
            }
            break;
        }
    }