5daad4bc
xiaoyu
游戏源码添加编译(现存问题:游戏内...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
//
// 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);
}
|