添加微信云开发环境
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween, math, RigidBody2D, Animation, sp, Tween} from "cc";
|
||||
import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween, math, RigidBody2D, Animation, Tween} from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
@@ -50,7 +50,6 @@ export class SkillCom extends CCComp {
|
||||
debuff_value:number=0;
|
||||
debuff_count:number=0;
|
||||
// 组件引用
|
||||
spine:sp.Skeleton=null;
|
||||
anim:Animation=null;
|
||||
tweenInstance:Tween<any> = null;
|
||||
private moveDirection: Vec3 | null = null; // 添加一个属性来存储移动方向
|
||||
@@ -82,11 +81,9 @@ export class SkillCom extends CCComp {
|
||||
this.initializeSkillConfig();
|
||||
if (!this.skillConfig) return;
|
||||
this.node.setPosition(this.startPos.x,this.startPos.y,0)
|
||||
if(this.node.getChildByName('anm')){
|
||||
this.spine=this.node.getChildByName('anm').getComponent('sp.Skeleton') as sp.Skeleton;
|
||||
}else{
|
||||
this.anim=this.node.getComponent(Animation)
|
||||
}
|
||||
|
||||
this.anim=this.node.getComponent(Animation)
|
||||
|
||||
this.on(GameEvent.MissionEnd, this.doDestroy, this);
|
||||
this.node.active = true;
|
||||
//console.log("[SkillCom]:caster",this.caster)
|
||||
@@ -149,15 +146,7 @@ export class SkillCom extends CCComp {
|
||||
//console.log("[SkillCom]:has anim",anim)
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
if(this.node.getChildByName('anm')){
|
||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
||||
//console.log("[SkillCom]:has spine",this.spine)
|
||||
this.spine.setCompleteListener((trackEntry) => {
|
||||
this.onAnimationFinished()
|
||||
//console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
onAnimationFinished(){
|
||||
// console.log("[SkillCom]:onAnimationFinished",this.s_uuid)
|
||||
@@ -233,12 +222,10 @@ export class SkillCom extends CCComp {
|
||||
}
|
||||
|
||||
if(smc.mission.pause) {
|
||||
if(this.spine) this.spine.paused=true
|
||||
if(this.anim) this.anim.pause()
|
||||
return;
|
||||
}
|
||||
if(this.anim) this.anim.resume()
|
||||
if(this.spine) this.spine.paused=false
|
||||
if (!this.node || !this.node.isValid) return;
|
||||
|
||||
if(this.skillConfig.EType==EType.timeEnd){
|
||||
|
||||
Reference in New Issue
Block a user