123456789101112131415161718192021 |
- import { _decorator, Component, Node } from 'cc';
- const { ccclass, property } = _decorator;
- @ccclass('test')
- export class test extends Component {
- start() {
- this.node.on(Node.EventType.TOUCH_START,()=>{
- console.log("TOUCH_START")
- })
- this.node.on(Node.EventType.TOUCH_MOVE,()=>{
- console.log("TOUCH_MOVE")
- })
- this.node.on(Node.EventType.TOUCH_END,()=>{
- console.log("TOUCH_END")
- })
- }
- }
|