namespace Game {

    class TouchEvent : Event {

        field x;
        field y;
        field id;
        field down;

        constructor(type, id, x, y) : base(type) {
            this.down = type == EventType.TOUCH_START;
            this.id = id;
            this.x = x;
            this.y = y;
        }
    }

    class TouchStartEvent : TouchEvent {
        constructor(id, x, y) : base(EventType.TOUCH_START, id, x, y) { }
    }

    class TouchEndEvent : TouchEvent {
        constructor(id, x, y) : base(EventType.TOUCH_END, id, x, y) { }
    }

    class TouchMoveEvent : TouchEvent {
        constructor(id, x, y) : base(EventType.TOUCH_MOVE, id, x, y) { }
    }
}
