技能碎片完成

This commit is contained in:
2024-12-17 16:55:50 +08:00
parent 3aca9948f2
commit a05d7a4507
8 changed files with 956 additions and 24 deletions

View File

@@ -38,19 +38,22 @@
}, },
{ {
"__id__": 42 "__id__": 42
},
{
"__id__": 48
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 48 "__id__": 58
}, },
{ {
"__id__": 50 "__id__": 60
} }
], ],
"_prefab": { "_prefab": {
"__id__": 52 "__id__": 62
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -1132,6 +1135,149 @@
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_prefab": {
"__id__": 49
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 48
},
"asset": {
"__uuid__": "7c02fdcf-20fe-40f6-a8a5-f5a8c1460861",
"__expectedType__": "cc.Prefab"
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"instance": {
"__id__": 50
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "5aqU9c+XdNsKGvQ/GGCmOC",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 51
},
{
"__id__": 53
},
{
"__id__": 54
},
{
"__id__": 55
},
{
"__id__": 56
},
{
"__id__": 57
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 52
},
"propertyPath": [
"_name"
],
"value": "schip"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"c46/YsCPVOJYA4mWEpNYRx"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 52
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 43,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 52
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 52
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 52
},
"propertyPath": [
"_lscale"
],
"value": {
"__type__": "cc.Vec3",
"x": 0.65,
"y": 0.65,
"z": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 52
},
"propertyPath": [
"_active"
],
"value": false
},
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
@@ -1142,7 +1288,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 49 "__id__": 59
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -1170,7 +1316,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 51 "__id__": 61
}, },
"_id": "" "_id": ""
}, },
@@ -1190,6 +1336,9 @@
"instance": null, "instance": null,
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": [ "nestedPrefabInstanceRoots": [
{
"__id__": 48
},
{ {
"__id__": 14 "__id__": 14
} }

View File

@@ -0,0 +1,726 @@
[
{
"__type__": "cc.Prefab",
"_name": "schip",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "schip",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 8
},
{
"__id__": 22
}
],
"_active": true,
"_components": [
{
"__id__": 28
},
{
"__id__": 30
}
],
"_prefab": {
"__id__": 32
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.6,
"y": 0.6,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 129,
"height": 132
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "7b1AqTRD5ME64Esj6ng1dt"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@3ac22",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8bAtx1erBCMpa5Gjs+EpnN"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "61vm1CsbJI5o6fjrN1bBFx",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "skill",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 9
}
],
"_active": true,
"_components": [
{
"__id__": 15
},
{
"__id__": 17
},
{
"__id__": 19
}
],
"_prefab": {
"__id__": 21
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.5,
"y": 0.5,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "icon",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
},
{
"__id__": 12
}
],
"_prefab": {
"__id__": 14
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.3,
"y": 1.3,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 9
},
"_enabled": true,
"__prefab": {
"__id__": 11
},
"_contentSize": {
"__type__": "cc.Size",
"width": 112,
"height": 116
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "58cDVDv9NNHpOe9wD+hWsa"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 9
},
"_enabled": true,
"__prefab": {
"__id__": 13
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "767c21dd-b2a2-4118-a12d-f67a8039abd4@fa39c",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "edi51irzpKDKLz+RbshuSX"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "ed+GboCMtMA5j7D4t/yuYW",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 16
},
"_contentSize": {
"__type__": "cc.Size",
"width": 129,
"height": 132
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "15DYj/iRRLkIiSvFKzIAaF"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 18
},
"_type": 3,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2fhdxMbT1G1YFGRp1uFNb5"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 20
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@3ac22",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8fddGLxJhK9IaZrqfS4C0k"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "34v809MiVNZKfhzLdaM9+C",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "num",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 23
},
{
"__id__": 25
}
],
"_prefab": {
"__id__": 27
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 18.414,
"y": -20.513,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 24
},
"_contentSize": {
"__type__": "cc.Size",
"width": 4,
"height": 39.28
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4e6kAMVQVCKr64qCyPdQh2"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 26
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 25,
"_fontSize": 25,
"_fontFamily": "Arial",
"_lineHeight": 28,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0eoM4xum5LW4uxUulIB6RF"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "93NuxDljtBl7yjMhAtOsiF",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 29
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "bafb2QLFdOPYA6doPdH0gj"
},
{
"__type__": "f653eE60XxPYoCKHpWk31Mn",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 31
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2aKWSWqChGQ4cms2EXhenV"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "7c02fdcf-20fe-40f6-a8a5-f5a8c1460861",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "schip"
}
}

View File

@@ -35,15 +35,15 @@ export class SingletonModuleComp extends ecs.Comp {
}; };
skills: any = { skills: any = {
1001:{lv:0,num:4,x1:0,x10:0}, 1001:{uuid:1001,lv:0,num:4,x1:1,x10:0},
1002:{lv:0,num:3,x1:0,x10:0}, 1002:{uuid:1002,lv:0,num:3,x1:2,x10:0},
1003:{lv:0,num:0,x1:0,x10:0}, 1003:{uuid:1003,lv:0,num:0,x1:0,x10:0},
1004:{lv:0,num:0,x1:0,x10:0}, 1004:{uuid:1004,lv:0,num:0,x1:0,x10:0},
1005:{lv:0,num:0,x1:0,x10:0}, 1005:{uuid:1005,lv:0,num:0,x1:0,x10:0},
1006:{lv:0,num:0,x1:0,x10:0}, 1006:{uuid:1006,lv:0,num:0,x1:0,x10:0},
1007:{lv:0,num:0,x1:0,x10:0}, 1007:{uuid:1007,lv:0,num:0,x1:0,x10:0},
1008:{lv:0,num:0,x1:0,x10:0}, 1008:{uuid:1008,lv:0,num:0,x1:0,x10:0},
1009:{lv:0,num:0,x1:0,x10:0}, 1009:{uuid:1009,lv:0,num:0,x1:0,x10:0},
}; };
/** 游戏主角 */ /** 游戏主角 */
heros:any={ heros:any={

View File

@@ -0,0 +1,35 @@
import { _decorator, Component, Label, Node, resources, Sprite, SpriteAtlas } from 'cc';
import { HeroInfo } from '../common/config/heroSet';
import { SkillSet } from '../common/config/SkillSet';
const { ccclass, property } = _decorator;
@ccclass('SChipComp')
export class SChipComp extends Component {
h_uuid:number=0
num:number=0
lv:number=0
start() {
}
update(deltaTime: number) {
}
update_data(uuid:number,num:number=0){
var icon_path = "game/skills/skill_icon"
// console.log("update_data",SkillSet[uuid].path)
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("skill").getChildByName("icon").getComponent(Sprite);
// console.log("update_data",atlas,sprite)
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[uuid].path);
});
if(num > 0){
this.node.getChildByName("num").getComponent(Label).string = num.toString();
}else{
this.node.getChildByName("num").getComponent(Label).string = "";
}
}
}

View File

@@ -0,0 +1 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"f653e13a-d17c-4f62-808a-1e95a4df5327","files":[],"subMetas":{},"userData":{}}

View File

@@ -4,6 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { Items } from "../common/config/Items"; import { Items } from "../common/config/Items";
import { HChipComp } from "../hero/HChipComp"; import { HChipComp } from "../hero/HChipComp";
import { SChipComp } from "../hero/SChipComp";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@@ -33,10 +34,16 @@ export class RewardComp extends CCComp {
if(type==1){ if(type==1){
this.node.getChildByName("icon").active=false this.node.getChildByName("icon").active=false
this.node.getChildByName("hchip").active=true this.node.getChildByName("hchip").active=true
let hchipcomp= this.node.getChildByName("hchip").getComponent(HChipComp) let hc= this.node.getChildByName("hchip").getComponent(HChipComp)
hchipcomp.update_data(uuid,0) hc.update_data(uuid,0)
} }
if(type==2){
this.node.getChildByName("icon").active=false
this.node.getChildByName("schip").active=true
let sc= this.node.getChildByName("schip").getComponent(SChipComp)
sc.update_data(uuid,0)
}
this.node.getChildByName("x1").getComponent(Label).string = x1.toString() this.node.getChildByName("x1").getComponent(Label).string = x1.toString()
this.node.getChildByName("x10").getComponent(Label).string = x10.toString() this.node.getChildByName("x10").getComponent(Label).string = x10.toString()

View File

@@ -41,26 +41,27 @@ export class VictoryComp extends CCComp {
smc.vmdata.exp.x10=smc.vmdata.exp.x1*9 smc.vmdata.exp.x10=smc.vmdata.exp.x1*9
} }
var parent = this.node.getChildByName("items") var parent = this.node.getChildByName("items")
var path = "game/gui/reward";
var prefab: Prefab = oops.res.get(path, Prefab)!;
for (let i in smc.items) { for (let i in smc.items) {
if(smc.items[i].x1 > 0){ if(smc.items[i].x1 > 0){
smc.items[i].x10 =smc.items[i].x1*9 smc.items[i].x10 =smc.items[i].x1*9
var path = "game/gui/reward";
var prefab: Prefab = oops.res.get(path, Prefab)!;
console.log("VictoryComp",prefab,smc.items[i])
var node = instantiate(prefab); var node = instantiate(prefab);
let rc:any= node.getComponent(RewardComp)!; let rc:any= node.getComponent(RewardComp)!;
rc.init(smc.items[i].uuid,smc.items[i].x1,smc.items[i].x10,parent,0) rc.init(smc.items[i].uuid,smc.items[i].x1,smc.items[i].x10,parent,0)
} }
} }
for (let i in smc.skills) { for (let i in smc.skills) {
if(smc.skills[i].x1 > 0){
smc.skills[i].x10 =smc.skills[i].x1*9
var node = instantiate(prefab);
let rc:any= node.getComponent(RewardComp)!;
rc.init(smc.skills[i].uuid,smc.skills[i].x1,smc.skills[i].x10,parent,2)
}
} }
for (let i in smc.heros) { for (let i in smc.heros) {
if(smc.heros[i].x1 > 0){ if(smc.heros[i].x1 > 0){
smc.heros[i].x10 =smc.heros[i].x1*9 smc.heros[i].x10 =smc.heros[i].x1*9
var path = "game/gui/reward";
var prefab: Prefab = oops.res.get(path, Prefab)!;
console.log("VictoryComp",prefab,smc.heros[i])
var node = instantiate(prefab); var node = instantiate(prefab);
let rc:any= node.getComponent(RewardComp)!; let rc:any= node.getComponent(RewardComp)!;
rc.init(smc.heros[i].uuid,smc.heros[i].x1,smc.heros[i].x10,parent,1) rc.init(smc.heros[i].uuid,smc.heros[i].x1,smc.heros[i].x10,parent,1)