去掉了 技能系统,技能由单个精灵独立处理

This commit is contained in:
2025-06-02 20:25:23 +08:00
parent c9a499e38b
commit 3fbfc2ea09
68 changed files with 3923 additions and 11907 deletions

View File

@@ -52,7 +52,7 @@ export class SkillCom extends CCComp {
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
this.node.active = true;
let collider = this.getComponent(Collider2D);
console.log(this.group +"技能 collider ",collider);
// console.log(this.group +"技能 collider ",collider);
collider.group = this.group;
if (collider) {
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
@@ -97,7 +97,7 @@ export class SkillCom extends CCComp {
this.startMovement();
}
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
console.log(this.scale+"碰撞开始 ",seCol,oCol);
// console.log(this.scale+"碰撞开始 ",seCol,oCol);
let target = oCol.getComponent(HeroViewComp)
let caster = seCol.getComponent(HeroViewComp)
if(oCol.group!=this.group){
@@ -149,7 +149,7 @@ export class SkillCom extends CCComp {
let e_pos = v3(this.targetPos.x,this.targetPos.y)
let time =Math.abs(Math.abs(this.targetPos.x-this.startPos.x)/this.speed)
console.log("开始贝塞尔运动=>time:"+time,"s_pos:"+s_pos,"c_pos:"+c_pos,"e_pos:"+e_pos)
// console.log("开始贝塞尔运动=>time:"+time,"s_pos:"+s_pos,"c_pos:"+c_pos,"e_pos:"+e_pos)
SkillCom.bezierTo(this.node,time,s_pos,c_pos,e_pos,{
onComplete: (target?: object) => {
this.is_destroy=true
@@ -171,10 +171,10 @@ export class SkillCom extends CCComp {
}
private startFixedStartMove() {
console.log("开始固定起点运动")
// console.log("开始固定起点运动")
this.node.position = this.startPos;
if (this.endType === endType.timeEnd) {
console.log("开始固定起点运动=>time:"+this.inTime)
// console.log("开始固定起点运动=>time:"+this.inTime)
tween(this.node)
.delay(this.inTime)
.call(() => this.is_destroy = true)
@@ -187,10 +187,10 @@ export class SkillCom extends CCComp {
}
private startFixedEndMove() {
console.log("开始固定终点运动")
// console.log("开始固定终点运动")
this.node.position = this.targetPos;
if (this.endType === endType.timeEnd) {
console.log("开始固定终点运动=>time:"+this.inTime)
// console.log("开始固定终点运动=>time:"+this.inTime)
tween(this.node)
.delay(this.inTime)
.call(() => this.is_destroy = true)