修改了挺多, 继续完善 战斗流程设计
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { _decorator, Component, Node, view, UITransform, Vec3, math, EventHandler, Graphics, Color, TweenEasing, Enum } from 'cc';
|
||||
import { SkillCom } from '../skills/SkillCom';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
// 定义缓动类型枚举
|
||||
@@ -139,7 +140,7 @@ export class BezierMove extends Component {
|
||||
|
||||
|
||||
update(deltaTime: number) {
|
||||
if (!this._isMoving || this._totalTime <= 0) return; // 如果没有移动或路径生成失败,则返回
|
||||
if (!this._isMoving || this._totalTime <= 0||smc.mission.pause||!smc.mission.play) return; // 如果没有移动或路径生成失败,则返回
|
||||
|
||||
// 更新进度
|
||||
this._t += deltaTime / this._totalTime;
|
||||
@@ -152,7 +153,7 @@ export class BezierMove extends Component {
|
||||
this.node.setPosition(this._endPoint);
|
||||
this._isMoving = false;
|
||||
// 触发移动完成事件
|
||||
console.log("onMoveComplete")
|
||||
// console.log("onMoveComplete")
|
||||
let skill=this.node.getComponent(SkillCom)
|
||||
if(skill){
|
||||
skill.doDestroy()
|
||||
|
||||
Reference in New Issue
Block a user