self-plane.ts 857 B

1234567891011121314151617181920212223242526272829
  1. import { _decorator, Component, Node, input, Input, EventTouch } from 'cc';
  2. const { ccclass, property } = _decorator;
  3. // 未使用
  4. @ccclass('self_plane')
  5. export class self_plane extends Component {
  6. // @property
  7. // public speed = 1;
  8. start() {
  9. // input.on(Input.EventType.TOUCH_START, this._touchStart, this);
  10. // input.on(Input.EventType.TOUCH_MOVE, this._touchMove, this);
  11. }
  12. // update(deltaTime: number) {
  13. // }
  14. // _touchMove(event: EventTouch) {
  15. // const delta = event.getDelta();
  16. // let pos = this.node.position;
  17. // // x 上下, z 左右
  18. // // this.node.setPosition(pos.x - 0.01 * this.speed * delta.x, pos.y, pos.z - 0.01 * this.speed * delta.y)
  19. // this.node.setPosition(pos.x + 0.01 * this.speed * delta.y, pos.y, pos.z + 0.01 * this.speed * delta.x)
  20. // }
  21. }