| 123456789101112131415161718 |
- import { _decorator, Component, SystemEventType, Vec3 } from 'cc';
- import { TouchHelper } from '../Main/TouchHelper';
- import { MapMove } from './MapMove';
- const { ccclass, property } = _decorator;
- /**
- * @description 使地图中的节点快速移动到视角中心
- * @author Soonsky
- */
- @ccclass('MoveToCenter')
- export class MoveToCenter extends Component {
- @property({ type: MapMove, tooltip: "地图移动控件" }) mapMove: MapMove;
- public move(position?: Vec3): void {
- this.mapMove.moveTo(position ? position : this.node.position);
- }
- }
|