super-hero/assets/cc-game/scripts/game_play/ShootingManager.ts

21 lines
634 B
TypeScript

import { _decorator, Component, Node } from 'cc';
import { NodeBase } from '../base/NodeBase';
import { EventTouch, Vec3 } from 'cc';
import { GameGlobalData } from '../global/GameGlobalData';
const { ccclass, property } = _decorator;
@ccclass('ShootingManager')
export class ShootingManager extends NodeBase {
protected onLoad(): void {
this.enableTouch();
}
protected onTouchStart(event: EventTouch) {
if (!GameGlobalData.Instance.isStatePlay()) return;
// this.originPoint = new Vec3(this.node.position);
// let point = this.getTouchPointInParentNode(event.getUILocation());
}
}