dd
This commit is contained in:
@@ -17,8 +17,8 @@ export enum GameEvent {
|
||||
CastSkill = "CastSkill",
|
||||
CardRefresh = "CardRefresh",
|
||||
UseCard = "UseCard",
|
||||
UserHeroCard = "UserHeroCard",
|
||||
UserSkillCard = "UserSkillCard",
|
||||
UseHeroCard = "UseHeroCard",
|
||||
UseSkillCard = "UseSkillCard",
|
||||
CallHero = "CallHero",
|
||||
MissionSkill = "MissionSkill",
|
||||
|
||||
|
||||
@@ -45,3 +45,10 @@ export const MBSet = {
|
||||
crit_cost:2,
|
||||
dodge_cost:2,
|
||||
}
|
||||
export const MissStatus = {
|
||||
ready:0,
|
||||
playing:1,
|
||||
pause:2,
|
||||
choose:3,
|
||||
end:4,
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('HeroInfoCompComp')
|
||||
@ecs.register('HeroInfoComp', false)
|
||||
export class HeroInfoCompComp extends CCComp {
|
||||
@property(Number)
|
||||
@property
|
||||
c_id:number=0
|
||||
@property(Boolean)
|
||||
@property
|
||||
is_Change:boolean=false
|
||||
|
||||
has_hero:boolean=false
|
||||
|
||||
@@ -75,10 +75,10 @@ export class CardComp extends CCComp {
|
||||
if(this.is_used) return
|
||||
switch(this.c_type){
|
||||
case 0:
|
||||
oops.message.dispatchEvent(GameEvent.UserHeroCard,{uuid:this.c_uuid})
|
||||
oops.message.dispatchEvent(GameEvent.UseHeroCard,{uuid:this.c_uuid})
|
||||
break
|
||||
case 1:
|
||||
oops.message.dispatchEvent(GameEvent.UserSkillCard,{uuid:this.c_uuid})
|
||||
oops.message.dispatchEvent(GameEvent.UseSkillCard,{uuid:this.c_uuid})
|
||||
break
|
||||
case 2:
|
||||
oops.message.dispatchEvent(GameEvent.UseCard,{uuid:this.c_uuid})
|
||||
|
||||
@@ -24,7 +24,7 @@ export class MissionHeroCompComp extends CCComp {
|
||||
2:{pos:v3(-270,65,0),has:false},
|
||||
}
|
||||
onLoad(){
|
||||
this.on(GameEvent.UserHeroCard,this.call_hero,this)
|
||||
this.on(GameEvent.UseHeroCard,this.show_heros_pos,this)
|
||||
}
|
||||
start() {
|
||||
// this.test_call()
|
||||
@@ -41,7 +41,9 @@ export class MissionHeroCompComp extends CCComp {
|
||||
test_call(){
|
||||
this.addHero(5010)
|
||||
}
|
||||
|
||||
show_heros_pos(){
|
||||
this.node.getChildByName("herospos").active=true
|
||||
}
|
||||
call_hero(event: string, args: any){
|
||||
this.timer.reset()
|
||||
let hero_list =HeroList
|
||||
|
||||
Reference in New Issue
Block a user