AniPinchGestureRecognizer.cpp 1.24 KB
//
//  AniPinchGestureRecognizer.cpp
//  SteveMaggieCpp
//
//  Created by Katarzyna Kalinowska-Górska on 19.05.2017.
//
//

#include <stdio.h>
#include "AniPinchGestureRecognizer.h"

/* Detect single-, double- or more finger touch and drag */
/* !! Warning: single touch will only work well with multiple touch if handled here!! */

//constructor

AniPinchGestureRecognizer::AniPinchGestureRecognizer() : AniGestureRecognizer({cocos2d::EventListener::Type::TOUCH_ALL_AT_ONCE})
{
   _onPinchDetectedCallback = [](std::vector<AniGestureRecognizer::TouchData> touches){};
    _multipleTouchInProgress = false;
}

AniPinchGestureRecognizer::~AniPinchGestureRecognizer()
{
}

// internal

bool AniPinchGestureRecognizer::onTouchesBegan(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event)
{
    AniGestureRecognizer::onTouchesBegan(touches, event);
   
    
    
    return true;
}

void AniPinchGestureRecognizer::onTouchesMoved(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event)
{
    AniGestureRecognizer::onTouchesMoved(touches, event);
    
}
    
void AniPinchGestureRecognizer::onTouchesEnded(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event)
{
    
        AniGestureRecognizer::onTouchesEnded(touches, event);
}