// // AniPinchGestureRecognizer.cpp // SteveMaggieCpp // // Created by Katarzyna Kalinowska-Górska on 19.05.2017. // // #include #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 touches){}; _multipleTouchInProgress = false; } AniPinchGestureRecognizer::~AniPinchGestureRecognizer() { } // internal bool AniPinchGestureRecognizer::onTouchesBegan(const std::vector& touches, cocos2d::Event* event) { AniGestureRecognizer::onTouchesBegan(touches, event); return true; } void AniPinchGestureRecognizer::onTouchesMoved(const std::vector& touches, cocos2d::Event* event) { AniGestureRecognizer::onTouchesMoved(touches, event); } void AniPinchGestureRecognizer::onTouchesEnded(const std::vector& touches, cocos2d::Event* event) { AniGestureRecognizer::onTouchesEnded(touches, event); }