| 123456789101112131415161718192021 |
- const {ccclass, property} = cc._decorator;
- @ccclass
- export default class TouchPanel extends cc.Component {
- onLoad() {
- this.node.getChildByName('Sky').on(cc.Node.EventType.TOUCH_START, (event:cc.Event.EventTouch) => {
- if (event.getLocation().y > 210) {
- window.gm.controlFlyUp();
- }
- window.fruitGroove.touchStart(event);
-
- });
- this.node.getChildByName('Sky').on(cc.Node.EventType.TOUCH_MOVE, (event:cc.Event.EventTouch) => {
- window.fruitGroove.touchMove(event);
- });
- this.node.getChildByName('Sky').on(cc.Node.EventType.TOUCH_END, (event:cc.Event.EventTouch) => {
- window.fruitGroove.touchEnd(event);
- });
- }
- }
|