1234567891011121314151617181920212223242526272829 |
- import { _decorator, Component, Node, input, Input, EventTouch } from 'cc';
- const { ccclass, property } = _decorator;
- // 未使用
- @ccclass('self_plane')
- export class self_plane extends Component {
- // @property
- // public speed = 1;
- start() {
- // input.on(Input.EventType.TOUCH_START, this._touchStart, this);
- // input.on(Input.EventType.TOUCH_MOVE, this._touchMove, this);
- }
- // update(deltaTime: number) {
- // }
- // _touchMove(event: EventTouch) {
- // const delta = event.getDelta();
- // let pos = this.node.position;
- // // x 上下, z 左右
- // // this.node.setPosition(pos.x - 0.01 * this.speed * delta.x, pos.y, pos.z - 0.01 * this.speed * delta.y)
- // this.node.setPosition(pos.x + 0.01 * this.speed * delta.y, pos.y, pos.z + 0.01 * this.speed * delta.x)
- // }
- }
|