技能继续重构
This commit is contained in:
@@ -23,10 +23,8 @@ export class SkillConComp extends CCComp {
|
||||
}
|
||||
onLoad(){
|
||||
this.HeroView=this.node.getComponent(HeroViewComp)
|
||||
// //console.log(this.HeroView.uid+"=>"+this.HeroView.hero_name+"=> SkillConComp onLoad")
|
||||
}
|
||||
start() {
|
||||
// //console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp start")
|
||||
this.HeroEntity=this.HeroView.ent
|
||||
}
|
||||
|
||||
@@ -34,10 +32,8 @@ export class SkillConComp extends CCComp {
|
||||
if(!smc.mission.play||smc.mission.pause) return
|
||||
if(!this.HeroView.isStun() && !this.HeroView.isFrost()) {
|
||||
let skills=this.HeroView.skills
|
||||
console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"技能列表:",skills)
|
||||
for(let i=0;i<skills.length;i++){
|
||||
skills[i].cd += dt;
|
||||
console.log(this.HeroView.uuid+"=>"+skills[i].cost,this.HeroView.mp)
|
||||
if(skills[i].cd > skills[i].cd_max&&this.HeroView.mp >= skills[i].cost){
|
||||
|
||||
if(SkillSet[skills[i].uuid].SType==SType.damage&&this.HeroView.is_atking){
|
||||
@@ -55,7 +51,6 @@ export class SkillConComp extends CCComp {
|
||||
|
||||
/** 施放技能 */
|
||||
castSkill(config: typeof SkillSet[keyof typeof SkillSet]) {
|
||||
// //console.log(view.uuid+"=>"+view.hero_name+"施放技能:"+config.uuid);
|
||||
let wfuny=this.check_wfuny()
|
||||
let dmg=0
|
||||
this.doSkill(config,wfuny,dmg);
|
||||
|
||||
Reference in New Issue
Block a user