清理smc
This commit is contained in:
@@ -26,11 +26,9 @@ export class MSkillComp extends CCComp {
|
||||
if(SkillSet[this.s_uuid]==undefined){this.skill_on=false; return}
|
||||
this.cd=SkillSet[this.s_uuid].cd;
|
||||
this.s_uuid=smc.mission.mskill
|
||||
smc.vmdata.mission.exp_max=SkillSet[this.s_uuid].exp
|
||||
|
||||
if(this.group == BoxSet.MONSTER){
|
||||
this.s_uuid=smc.mission.mmskill
|
||||
smc.vmdata.mission.mexp_max=SkillSet[this.s_uuid].exp
|
||||
}
|
||||
|
||||
var icon_path = "game/skills/skill_icon"
|
||||
@@ -43,7 +41,6 @@ export class MSkillComp extends CCComp {
|
||||
}
|
||||
protected update(dt: number): void {
|
||||
if(!this.skill_on) return
|
||||
this.check_exp()
|
||||
this.doing_cd(dt)
|
||||
}
|
||||
doing_cd(dt: number){
|
||||
@@ -55,23 +52,6 @@ export class MSkillComp extends CCComp {
|
||||
}
|
||||
}
|
||||
|
||||
check_exp(){
|
||||
switch(this.group){
|
||||
case BoxSet.HERO:
|
||||
if(smc.vmdata.mission.exp >= SkillSet[this.s_uuid].exp){
|
||||
console.log("hero MSkillComp check_exp s_uuid:",this.s_uuid,this.group);
|
||||
smc.vmdata.mission.exp-=SkillSet[this.s_uuid].exp
|
||||
this.lvup()
|
||||
}
|
||||
break;
|
||||
case BoxSet.MONSTER:
|
||||
if(smc.vmdata.mission.mexp >= SkillSet[this.s_uuid].exp){
|
||||
console.log("monster MSkillComp check_exp s_uuid:",this.s_uuid,this.group);
|
||||
smc.vmdata.mission.mexp-=SkillSet[this.s_uuid].exp
|
||||
this.lvup()
|
||||
}
|
||||
}
|
||||
}
|
||||
lvup(){
|
||||
this.lv++
|
||||
this.node.getChildByName("lv").getComponent(Label).string=this.lv.toString()
|
||||
|
||||
Reference in New Issue
Block a user