public Slicer2DInputController()
    {
        multiTouch = true;

        for (int id = 0; id < 10; id++)
        {
            input[id] = new Slicer2DInput();
        }
    }
    public void Play(int id = 0)
    {
        Slicer2DInput inp = input[id];

        inp.pressed  = false;
        inp.clicked  = false;
        inp.position = Vector2.zero;

        inp.playing = true;

        inp.eventsPlaying = new List <Slicer2DInputEvent>(inp.eventsBank);
    }
    public void Update_AI(int id = 0)
    {
        Slicer2DInput inp = input[id];

        if (inp.playing == false)
        {
            return;
        }

        inp.released = false;

        if (inp.currentEvent == null)
        {
            if (inp.eventsPlaying.Count > 0)
            {
                Slicer2DInputEvent e = inp.eventsPlaying.First();

                switch (e.eventType)
                {
                case Slicer2DInputEvent.EventType.SetPosition:
                    inp.position = e.position;
                    break;

                case Slicer2DInputEvent.EventType.Move:
                    break;

                case Slicer2DInputEvent.EventType.Press:
                    inp.pressed = true;
                    inp.clicked = true;
                    break;

                case Slicer2DInputEvent.EventType.Release:
                    inp.pressed  = false;
                    inp.released = true;
                    break;
                }

                inp.timer = TimerHelper.Create();

                inp.currentEvent = e;

                inp.eventsPlaying.Remove(e);
            }
        }
        else
        {
            switch (inp.currentEvent.eventType)
            {
            case Slicer2DInputEvent.EventType.Move:
                inp.position.x = Mathf.Lerp((float)inp.position.x, inp.currentEvent.position.x, inp.timer.Get() / inp.currentEvent.time);
                inp.position.y = Mathf.Lerp((float)inp.position.y, inp.currentEvent.position.y, inp.timer.Get() / inp.currentEvent.time);
                break;
            }

            if (inp.timer.Get() > inp.currentEvent.time)
            {
                inp.currentEvent = null;

                if (inp.eventsPlaying.Count < 1)
                {
                    inp.EventsCompleted();
                }
            }
        }

        if (inp.eventsPlaying.Count < 1)
        {
            if (inp.currentEvent == null)
            {
                if (inp.loop)
                {
                    Play();
                }

                inp.playing = false;
            }
        }
    }