减少复杂度,上阵英雄改为3个
This commit is contained in:
@@ -241,8 +241,8 @@
|
|||||||
},
|
},
|
||||||
"_lscale": {
|
"_lscale": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0.15,
|
"x": 0.3,
|
||||||
"y": 0.15,
|
"y": 0.3,
|
||||||
"z": 1
|
"z": 1
|
||||||
},
|
},
|
||||||
"_mobility": 0,
|
"_mobility": 0,
|
||||||
@@ -269,13 +269,13 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 695.7100219726562,
|
"width": 314.1499938964844,
|
||||||
"height": 631.8900146484375
|
"height": 336.3500061035156
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
"x": 0.3869859603616717,
|
"x": 0.483590644980259,
|
||||||
"y": 0.04905917055398852
|
"y": 0.03225806506490894
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
@@ -306,11 +306,11 @@
|
|||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_skeletonData": {
|
"_skeletonData": {
|
||||||
"__uuid__": "89c4e995-dd0a-4136-90fa-30a1d2c35409",
|
"__uuid__": "af4a5925-6b13-46bc-ba05-2419fa3d5cb2",
|
||||||
"__expectedType__": "sp.SkeletonData"
|
"__expectedType__": "sp.SkeletonData"
|
||||||
},
|
},
|
||||||
"defaultSkin": "default",
|
"defaultSkin": "default",
|
||||||
"defaultAnimation": "Idle",
|
"defaultAnimation": "Walking",
|
||||||
"_premultipliedAlpha": true,
|
"_premultipliedAlpha": true,
|
||||||
"_timeScale": 0.7,
|
"_timeScale": 0.7,
|
||||||
"_preCacheMode": 0,
|
"_preCacheMode": 0,
|
||||||
|
|||||||
@@ -50,4 +50,5 @@ export enum GameSet {
|
|||||||
MON_COIN_ADD=2,
|
MON_COIN_ADD=2,
|
||||||
COIN_ADD=1,
|
COIN_ADD=1,
|
||||||
DEF_RATE=0.5,
|
DEF_RATE=0.5,
|
||||||
|
HERO_NUM=3,
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ export const HeroInfo = {
|
|||||||
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
|
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
|
||||||
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
|
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
|
||||||
},
|
},
|
||||||
//坦克,高闪避 , 反伤害
|
//坦克,高闪避 ,加闪避
|
||||||
5003: {
|
5003: {
|
||||||
uuid:5003,name: "防御骑士",path:"k3",type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:100,a_cd:1.5,
|
uuid:5003,name: "防御骑士",path:"k3",type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:100,a_cd:1.5,
|
||||||
lvexp:0,slvexp:0,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
|
lvexp:0,slvexp:0,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
|
|||||||
import { MissionHomeComp } from "../map/MissionHomeComp";
|
import { MissionHomeComp } from "../map/MissionHomeComp";
|
||||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
import { smc } from "../common/SingletonModuleComp";
|
||||||
|
import { GameSet } from "../common/config/BoxSet";
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@@ -34,8 +35,8 @@ export class HeroSelectComp extends CCComp {
|
|||||||
this.mhc_home.cancel_hero(this.h_uuid)
|
this.mhc_home.cancel_hero(this.h_uuid)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(smc.fight_heros.length>= 5){
|
if(smc.fight_heros.length>= GameSet.HERO_NUM){
|
||||||
oops.gui.toast("英雄数量不能超过5个")
|
oops.gui.toast(`英雄数量不能超过 ${GameSet.HERO_NUM} 个`);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
smc.fight_heros.push(this.h_uuid)
|
smc.fight_heros.push(this.h_uuid)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
|
|||||||
import { HeroInfo, HeroList } from "../common/config/heroSet";
|
import { HeroInfo, HeroList } from "../common/config/heroSet";
|
||||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||||
import { UiHeroComp } from "../hero/UiHeroComp";
|
import { UiHeroComp } from "../hero/UiHeroComp";
|
||||||
import { BoxSet } from "../common/config/BoxSet";
|
import { BoxSet, GameSet } from "../common/config/BoxSet";
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
import { smc } from "../common/SingletonModuleComp";
|
||||||
import { HeroSelect } from "../hero/HeroSelect";
|
import { HeroSelect } from "../hero/HeroSelect";
|
||||||
import { MSklist, SkillSet } from "../common/config/SkillSet";
|
import { MSklist, SkillSet } from "../common/config/SkillSet";
|
||||||
@@ -24,8 +24,6 @@ export class MissionHomeComp extends CCComp {
|
|||||||
|
|
||||||
heros:any[]=[];
|
heros:any[]=[];
|
||||||
heros_pos:any=[
|
heros_pos:any=[
|
||||||
{uuid:0,px:100},
|
|
||||||
{uuid:0,px:0},
|
|
||||||
{uuid:0,px:-100},
|
{uuid:0,px:-100},
|
||||||
{uuid:0,px:-200},
|
{uuid:0,px:-200},
|
||||||
{uuid:0,px:-300},
|
{uuid:0,px:-300},
|
||||||
@@ -48,8 +46,6 @@ export class MissionHomeComp extends CCComp {
|
|||||||
}
|
}
|
||||||
this.heros=[]
|
this.heros=[]
|
||||||
this.heros_pos=[
|
this.heros_pos=[
|
||||||
{uuid:0,px:100},
|
|
||||||
{uuid:0,px:0},
|
|
||||||
{uuid:0,px:-100},
|
{uuid:0,px:-100},
|
||||||
{uuid:0,px:-200},
|
{uuid:0,px:-200},
|
||||||
{uuid:0,px:-300},
|
{uuid:0,px:-300},
|
||||||
@@ -120,7 +116,7 @@ export class MissionHomeComp extends CCComp {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
select_hero(h_uuid:number){
|
select_hero(h_uuid:number){
|
||||||
for(let i=0;i<=4;i++){
|
for(let i=0;i<GameSet.HERO_NUM;i++){
|
||||||
if(this.heros_pos[i].uuid==0){
|
if(this.heros_pos[i].uuid==0){
|
||||||
this.heros_pos[i].uuid=h_uuid
|
this.heros_pos[i].uuid=h_uuid
|
||||||
this.call_hero(h_uuid,i)
|
this.call_hero(h_uuid,i)
|
||||||
@@ -129,7 +125,7 @@ export class MissionHomeComp extends CCComp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cancel_hero(h_uuid:number){
|
cancel_hero(h_uuid:number){
|
||||||
for(let i=0;i<=4;i++){
|
for(let i=0;i<GameSet.HERO_NUM;i++){
|
||||||
if(this.heros_pos[i].uuid==h_uuid){
|
if(this.heros_pos[i].uuid==h_uuid){
|
||||||
this.heros_pos[i].uuid=0
|
this.heros_pos[i].uuid=0
|
||||||
this.destory_hero(h_uuid)
|
this.destory_hero(h_uuid)
|
||||||
|
|||||||
Reference in New Issue
Block a user