物品 和 金币等资源分开
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "ca42e1a1-960b-4c04-9b15-cb5290e588a2",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "exp"
|
||||
}
|
||||
}
|
||||
@@ -175,10 +175,7 @@
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "8e53e122-d71b-440a-bb07-9938dd6c20d9@62b4a",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
@@ -656,10 +653,7 @@
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "8e53e122-d71b-440a-bb07-9938dd6c20d9@c30fb",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_spriteFrame": null,
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
@@ -3465,7 +3459,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "frame2",
|
||||
"_name": "bg",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
@@ -3563,10 +3557,7 @@
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "8e53e122-d71b-440a-bb07-9938dd6c20d9@58efa",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_spriteFrame": null,
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "db911dbb-a055-41f8-ba26-706b423a3a52",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "mexp"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 33 KiB |
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "efd3008b-716f-416a-bf4c-ab5cf1672e60",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "efd3008b-716f-416a-bf4c-ab5cf1672e60@6c48a",
|
||||
"displayName": "rewards",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "repeat",
|
||||
"wrapModeT": "repeat",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "efd3008b-716f-416a-bf4c-ab5cf1672e60",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "texture",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "efd3008b-716f-416a-bf4c-ab5cf1672e60@6c48a"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "270afabb-368b-4c40-b302-6f8852fd4c1e",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "rewards"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "dc0b56d7-c633-4cd2-a6ff-8fa2d7456d9d",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "top_inf"
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,25 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
goods2:[ {uuid:1002,num:100}, {uuid:9002,num:1} ],
|
||||
goods3:[ {uuid:1007,num:100}, {uuid:9002,num:1} ],
|
||||
goods4:[ {uuid:9001,num:100}, {uuid:9002,num:1} ],
|
||||
}
|
||||
};
|
||||
items:{
|
||||
1001:{num:1000,x1:1,x10:0},
|
||||
1002:{num:1000,x1:2,x10:0},
|
||||
1003:{num:1000,x1:3,x10:0},
|
||||
1004:{num:1000,x1:0,x10:0},
|
||||
1005:{num:1000,x1:0,x10:0},
|
||||
1006:{num:1000,x1:0,x10:0},
|
||||
1007:{num:1000,x1:0,x10:0},
|
||||
1008:{num:1000,x1:0,x10:0},
|
||||
1009:{num:1000,x1:0,x10:0},
|
||||
1010:{num:1000,x1:0,x10:0},
|
||||
1011:{num:1000,x1:0,x10:0},
|
||||
1012:{num:1000,x1:0,x10:0},
|
||||
1013:{num:1000,x1:0,x10:0},
|
||||
1014:{num:1000,x1:0,x10:0},
|
||||
1015:{num:1000,x1:0,x10:0},
|
||||
1016:{num:1000,x1:0,x10:0},
|
||||
};
|
||||
fight_heros=[9001,9002]
|
||||
mheros:any = [];
|
||||
monsters:any = [];
|
||||
@@ -76,7 +94,6 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
enemy_pos:any =[]
|
||||
vmdata: any = {
|
||||
name : "纸片精灵大乱斗",
|
||||
gold:99999999,
|
||||
game_over:false,
|
||||
game_pause:false,
|
||||
mission:{
|
||||
@@ -103,30 +120,11 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
reward_gold:0,
|
||||
reward_exp:0,
|
||||
},
|
||||
role:{
|
||||
gold:9999999,
|
||||
gems:0,
|
||||
energy:0,
|
||||
},
|
||||
items:{
|
||||
1001:{num:1000,x1:1,x10:0},
|
||||
1002:{num:1000,x1:2,x10:0},
|
||||
1003:{num:1000,x1:3,x10:0},
|
||||
1004:{num:1000,x1:0,x10:0},
|
||||
1005:{num:1000,x1:0,x10:0},
|
||||
1006:{num:1000,x1:0,x10:0},
|
||||
1007:{num:1000,x1:0,x10:0},
|
||||
1008:{num:1000,x1:0,x10:0},
|
||||
1009:{num:1000,x1:0,x10:0},
|
||||
1010:{num:1000,x1:0,x10:0},
|
||||
1011:{num:1000,x1:0,x10:0},
|
||||
1012:{num:1000,x1:0,x10:0},
|
||||
1013:{num:1000,x1:0,x10:0},
|
||||
1014:{num:1000,x1:0,x10:0},
|
||||
1015:{num:1000,x1:0,x10:0},
|
||||
1016:{num:1000,x1:0,x10:0},
|
||||
9001:{num:854587,x1:9999,x10:0},
|
||||
},
|
||||
gold:{num:9999999,x1:1,x10:0},
|
||||
exp:{num:1000,x1:1,x10:0},
|
||||
skp:{num:2000,x1:1,x10:0}, //技能升级点数
|
||||
energy:{num:10,x1:1,x10:0},
|
||||
|
||||
free:{ cost:0,num:3,buy:3,},
|
||||
goods1:{ cost:2000,num:3,buy:3,},
|
||||
goods2:{ cost:3000,num:4,buy:3,},
|
||||
|
||||
@@ -156,11 +156,11 @@ export class HeroHomeComp extends CCComp {
|
||||
|
||||
|
||||
lv_up(){
|
||||
if(smc.vmdata.items[1001].num < ((LvUp[0]+this.hero.lvexp)*this.role.lv)){
|
||||
if(smc.vmdata.exp.num < ((LvUp[0]+this.hero.lvexp)*this.role.lv)){
|
||||
oops.gui.toast("资源不足,升级失败");
|
||||
return
|
||||
}
|
||||
smc.vmdata.items[1001].num -= ((LvUp[0]+this.hero.lvexp)*this.role.lv)
|
||||
smc.vmdata.exp.num -= ((LvUp[0]+this.hero.lvexp)*this.role.lv)
|
||||
this.role.lv++
|
||||
this.update_data()
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export class MSCardComp extends CCComp {
|
||||
}
|
||||
update_data(){
|
||||
this.node.getChildByName("lv").getComponent(Label).string = smc.skills[this.s_uuid].lv.toString()+"级";
|
||||
this.node.getChildByName("update").getChildByName("cost").getComponent(Label).string =smc.skills[this.s_uuid].num.toString()+ " / "+(SkillSet[this.s_uuid].upcost*(1+smc.skills[this.s_uuid].lv)).toString()
|
||||
this.node.getChildByName("update").getChildByName("cost").getComponent(Label).string =smc.vmdata.skp.num.toString()+ " / "+(SkillSet[this.s_uuid].upcost*(1+smc.skills[this.s_uuid].lv)).toString()
|
||||
}
|
||||
select(){
|
||||
smc.mission.mskill=this.s_uuid
|
||||
@@ -55,11 +55,11 @@ export class MSCardComp extends CCComp {
|
||||
}
|
||||
}
|
||||
update_lv(){
|
||||
if(smc.skills[this.s_uuid].num <= (SkillSet[this.s_uuid].upcost*(1+smc.skills[this.s_uuid].lv))){
|
||||
oops.gui.toast("升级需要消耗"+SkillSet[this.s_uuid].upcost+"个能力石")
|
||||
if(smc.vmdata.skp.num <= (SkillSet[this.s_uuid].upcost*(1+smc.skills[this.s_uuid].lv))){
|
||||
oops.gui.toast("升级需要消耗"+SkillSet[this.s_uuid].upcost+"个魔法石")
|
||||
return
|
||||
}
|
||||
smc.skills[this.s_uuid].num -= (SkillSet[this.s_uuid].upcost*(1+smc.skills[this.s_uuid].lv))
|
||||
smc.vmdata.skp.num -= (SkillSet[this.s_uuid].upcost*(1+smc.skills[this.s_uuid].lv))
|
||||
smc.skills[this.s_uuid].lv++
|
||||
let mscards:any= ecs.query(ecs.allOf(MSCardComp));
|
||||
for(let i=0;i<mscards.length;i++){
|
||||
|
||||
@@ -149,8 +149,8 @@ export class MissionComp extends CCComp {
|
||||
this.clear_x1()
|
||||
}
|
||||
clear_x1(){
|
||||
for (let i in smc.vmdata.items) {
|
||||
smc.vmdata.items[i].x1=smc.vmdata.items[i].x10=0
|
||||
for (let i in smc.items) {
|
||||
smc.items[i].x1=smc.items[i].x10=0
|
||||
}
|
||||
for (let i in smc.skills) {
|
||||
smc.skills[i].x1=smc.skills[i].x10=0
|
||||
@@ -158,7 +158,7 @@ export class MissionComp extends CCComp {
|
||||
for (let i in smc.heros) {
|
||||
smc.heros[i].x1=smc.heros[i].x10=0
|
||||
}
|
||||
console.log("clear_x1",smc.vmdata.items,smc.skills,smc.heros)
|
||||
console.log("clear_x1",smc.items,smc.skills,smc.heros)
|
||||
}
|
||||
mskill_init(){
|
||||
this.MSComp.group=BoxSet.HERO
|
||||
|
||||
@@ -27,46 +27,21 @@ export class VictoryComp extends CCComp {
|
||||
}
|
||||
onAdded(args: any) {
|
||||
console.log("VictoryComp onAdded",args)
|
||||
let items=smc.vmdata.items
|
||||
if(items[9001].x1 > 0) this.node.getChildByName("items").getChildByName("9001").active=true
|
||||
if(items[1001].x1 > 0) this.node.getChildByName("items").getChildByName("1001").active=true
|
||||
if(items[1002].x1 > 0) this.node.getChildByName("items").getChildByName("1002").active=true
|
||||
if(items[1003].x1 > 0) this.node.getChildByName("items").getChildByName("1003").active=true
|
||||
if(items[1004].x1 > 0) this.node.getChildByName("items").getChildByName("1004").active=true
|
||||
if(items[1005].x1 > 0) this.node.getChildByName("items").getChildByName("1005").active=true
|
||||
if(items[1006].x1 > 0) this.node.getChildByName("items").getChildByName("1006").active=true
|
||||
if(items[1007].x1 > 0) this.node.getChildByName("items").getChildByName("1007").active=true
|
||||
if(items[1008].x1 > 0) this.node.getChildByName("items").getChildByName("1008").active=true
|
||||
if(items[1009].x1 > 0) this.node.getChildByName("items").getChildByName("1009").active=true
|
||||
if(items[1010].x1 > 0) this.node.getChildByName("items").getChildByName("1010").active=true
|
||||
if(items[1011].x1 > 0) this.node.getChildByName("items").getChildByName("1011").active=true
|
||||
if(items[1012].x1 > 0) this.node.getChildByName("items").getChildByName("1012").active=true
|
||||
if(items[1013].x1 > 0) this.node.getChildByName("items").getChildByName("1013").active=true
|
||||
if(items[1014].x1 > 0) this.node.getChildByName("items").getChildByName("1014").active=true
|
||||
if(items[1015].x1 > 0) this.node.getChildByName("items").getChildByName("1015").active=true
|
||||
if(items[1016].x1 > 0) this.node.getChildByName("items").getChildByName("1016").active=true
|
||||
let items=smc.items
|
||||
if(smc.vmdata.gold.x1 > 0) this.node.getChildByName("items").getChildByName("gold").active=true
|
||||
if(smc.vmdata.skp.x1 > 0) this.node.getChildByName("items").getChildByName("skp").active=true
|
||||
if(smc.vmdata.exp.x1 > 0) this.node.getChildByName("items").getChildByName("exp").active=true
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
do_x10(){
|
||||
console.log("do_x10",smc.vmdata)
|
||||
smc.vmdata.items[9001].num+=smc.vmdata.items[9001].x10
|
||||
smc.vmdata.items[1001].num+=smc.vmdata.items[1001].x10
|
||||
smc.vmdata.items[1002].num+=smc.vmdata.items[1002].x10
|
||||
smc.vmdata.items[1003].num+=smc.vmdata.items[1003].x10
|
||||
smc.vmdata.items[1004].num+=smc.vmdata.items[1004].x10
|
||||
smc.vmdata.items[1005].num+=smc.vmdata.items[1005].x10
|
||||
smc.vmdata.items[1006].num+=smc.vmdata.items[1006].x10
|
||||
smc.vmdata.items[1007].num+=smc.vmdata.items[1007].x10
|
||||
smc.vmdata.items[1008].num+=smc.vmdata.items[1008].x10
|
||||
smc.vmdata.items[1009].num+=smc.vmdata.items[1009].x10
|
||||
smc.vmdata.items[1010].num+=smc.vmdata.items[1010].x10
|
||||
smc.vmdata.items[1011].num+=smc.vmdata.items[1011].x10
|
||||
smc.vmdata.items[1012].num+=smc.vmdata.items[1012].x10
|
||||
smc.vmdata.items[1013].num+=smc.vmdata.items[1013].x10
|
||||
smc.vmdata.items[1014].num+=smc.vmdata.items[1014].x10
|
||||
smc.vmdata.items[1015].num+=smc.vmdata.items[1015].x10
|
||||
smc.vmdata.items[1016].num+=smc.vmdata.items[1016].x10
|
||||
for (let i in smc.items) {
|
||||
smc.items[i].num+=smc.items[i].x10
|
||||
}
|
||||
|
||||
this.clear_x1()
|
||||
this.reset();
|
||||
}
|
||||
@@ -78,23 +53,16 @@ export class VictoryComp extends CCComp {
|
||||
}
|
||||
|
||||
clear_x1(){
|
||||
smc.vmdata.items[9001].x1=smc.vmdata.items[9001].x10=0
|
||||
smc.vmdata.items[1001].x1=smc.vmdata.items[1001].x10=0
|
||||
smc.vmdata.items[1002].x1=smc.vmdata.items[1002].x10=0
|
||||
smc.vmdata.items[1003].x1=smc.vmdata.items[1003].x10=0
|
||||
smc.vmdata.items[1004].x1=smc.vmdata.items[1004].x10=0
|
||||
smc.vmdata.items[1005].x1=smc.vmdata.items[1005].x10=0
|
||||
smc.vmdata.items[1006].x1=smc.vmdata.items[1006].x10=0
|
||||
smc.vmdata.items[1007].x1=smc.vmdata.items[1007].x10=0
|
||||
smc.vmdata.items[1008].x1=smc.vmdata.items[1008].x10=0
|
||||
smc.vmdata.items[1009].x1=smc.vmdata.items[1009].x10=0
|
||||
smc.vmdata.items[1010].x1=smc.vmdata.items[1010].x10=0
|
||||
smc.vmdata.items[1011].x1=smc.vmdata.items[1011].x10=0
|
||||
smc.vmdata.items[1012].x1=smc.vmdata.items[1012].x10=0
|
||||
smc.vmdata.items[1013].x1=smc.vmdata.items[1013].x10=0
|
||||
smc.vmdata.items[1014].x1=smc.vmdata.items[1014].x10=0
|
||||
smc.vmdata.items[1015].x1=smc.vmdata.items[1015].x10=0
|
||||
smc.vmdata.items[1016].x1=smc.vmdata.items[1016].x10=0
|
||||
for (let i in smc.items) {
|
||||
smc.items[i].x1=smc.items[i].x10=0
|
||||
}
|
||||
for (let i in smc.skills) {
|
||||
smc.skills[i].x1=smc.skills[i].x10=0
|
||||
}
|
||||
for (let i in smc.heros) {
|
||||
smc.heros[i].x1=smc.heros[i].x10=0
|
||||
}
|
||||
console.log("clear_x1",smc.items,smc.skills,smc.heros)
|
||||
}
|
||||
end_mission(){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user