减少复杂度,上阵英雄改为3个
This commit is contained in:
@@ -4,6 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
|
||||
import { MissionHomeComp } from "../map/MissionHomeComp";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { GameSet } from "../common/config/BoxSet";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -34,8 +35,8 @@ export class HeroSelectComp extends CCComp {
|
||||
this.mhc_home.cancel_hero(this.h_uuid)
|
||||
return
|
||||
}
|
||||
if(smc.fight_heros.length>= 5){
|
||||
oops.gui.toast("英雄数量不能超过5个")
|
||||
if(smc.fight_heros.length>= GameSet.HERO_NUM){
|
||||
oops.gui.toast(`英雄数量不能超过 ${GameSet.HERO_NUM} 个`);
|
||||
return
|
||||
}
|
||||
smc.fight_heros.push(this.h_uuid)
|
||||
|
||||
Reference in New Issue
Block a user