去掉了 技能系统,技能由单个精灵独立处理
This commit is contained in:
@@ -18,10 +18,25 @@ export class CardComp extends CCComp {
|
||||
c_uuid:number=0;
|
||||
c_type:number=0;
|
||||
is_used:boolean=false;
|
||||
|
||||
onLoad(){
|
||||
this.on(GameEvent.CardRefresh,this.onCardRefresh,this)
|
||||
this.on(GameEvent.MissionStart,this.mission_start,this)
|
||||
this.on(GameEvent.MissionEnd,this.mission_end,this)
|
||||
this.on(GameEvent.CardRefresh,this.onHandler,this)
|
||||
this.on(GameEvent.MissionStart,this.onHandler,this)
|
||||
this.on(GameEvent.MissionEnd,this.onHandler,this)
|
||||
}
|
||||
/** 全局消息逻辑处理 */
|
||||
private onHandler(event: string, args: any) {
|
||||
switch (event) {
|
||||
case GameEvent.CardRefresh:
|
||||
this.onCardRefresh(event,args)
|
||||
break;
|
||||
case GameEvent.MissionStart:
|
||||
this.mission_start(event,args)
|
||||
break;
|
||||
case GameEvent.MissionEnd:
|
||||
this.mission_end(event,args)
|
||||
break;
|
||||
}
|
||||
}
|
||||
start() {
|
||||
this.init_card()
|
||||
@@ -31,10 +46,10 @@ export class CardComp extends CCComp {
|
||||
this.node.getChildByName("Button").active=false
|
||||
this.node.getChildByName("show").active=false
|
||||
}
|
||||
mission_start(){
|
||||
mission_start(event: string, args: any){
|
||||
|
||||
}
|
||||
mission_end(){
|
||||
mission_end(event: string, args: any){
|
||||
|
||||
}
|
||||
onCardRefresh(event: string, args: any){
|
||||
|
||||
Reference in New Issue
Block a user