maybefinish
This commit is contained in:
parent
35cc8c1f1e
commit
0901a1fc74
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
678
assets/resources/prefabs/UIPrefab/qualityStar.prefab
Normal file
678
assets/resources/prefabs/UIPrefab/qualityStar.prefab
Normal file
@ -0,0 +1,678 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"asyncLoadAssets": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "qualityStar",
|
||||
"_objFlags": 0,
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 14
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 17
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 170,
|
||||
"height": 32
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "pic_gy_star",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 34,
|
||||
"height": 32
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -68,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "dc0f2c20-4d34-44ee-842d-5dac4bd7cdd0"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_state": 0,
|
||||
"_atlas": null,
|
||||
"_tilecount": 1,
|
||||
"_tileoffx": 0,
|
||||
"_tileoffy": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "22jLyteaVAOo3L6Jmg4IU8",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "pic_gy_star copy",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 34,
|
||||
"height": 32
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -34,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_enabled": true,
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "dc0f2c20-4d34-44ee-842d-5dac4bd7cdd0"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_state": 0,
|
||||
"_atlas": null,
|
||||
"_tilecount": 1,
|
||||
"_tileoffx": 0,
|
||||
"_tileoffy": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "75f4ABp/1DJKEATEz/1F87",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "pic_gy_star copy",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 34,
|
||||
"height": 32
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "dc0f2c20-4d34-44ee-842d-5dac4bd7cdd0"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_state": 0,
|
||||
"_atlas": null,
|
||||
"_tilecount": 1,
|
||||
"_tileoffx": 0,
|
||||
"_tileoffy": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "d3w0N4OlpMTLWgB0lcv+CG",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "pic_gy_star copy",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 12
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 34,
|
||||
"height": 32
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 34,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_enabled": true,
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "dc0f2c20-4d34-44ee-842d-5dac4bd7cdd0"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_state": 0,
|
||||
"_atlas": null,
|
||||
"_tilecount": 1,
|
||||
"_tileoffx": 0,
|
||||
"_tileoffy": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "26fOXijuZAC4zwnBu4mE1r",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "pic_gy_star copy",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_level": 3,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 34,
|
||||
"height": 32
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 68,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_enabled": true,
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "dc0f2c20-4d34-44ee-842d-5dac4bd7cdd0"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_state": 0,
|
||||
"_atlas": null,
|
||||
"_tilecount": 1,
|
||||
"_tileoffx": 0,
|
||||
"_tileoffy": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "54wmtoG8pOZYW6gXbMLZLo",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Layout",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"_layoutSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 170,
|
||||
"height": 32
|
||||
},
|
||||
"_resize": 1,
|
||||
"_N$layoutType": 1,
|
||||
"_N$padding": 0,
|
||||
"_N$cellSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 40,
|
||||
"height": 40
|
||||
},
|
||||
"_N$startAxis": 0,
|
||||
"_N$paddingLeft": 0,
|
||||
"_N$paddingRight": 0,
|
||||
"_N$paddingTop": 0,
|
||||
"_N$paddingBottom": 0,
|
||||
"_N$spacingX": 0,
|
||||
"_N$spacingY": 0,
|
||||
"_N$verticalDirection": 1,
|
||||
"_N$horizontalDirection": 0,
|
||||
"_N$affectedByScale": false,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "3cae6+YOCpL0ZiMkXwXiChi",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"nullStar": {
|
||||
"__uuid__": "dc0f2c20-4d34-44ee-842d-5dac4bd7cdd0"
|
||||
},
|
||||
"yellowStar": {
|
||||
"__uuid__": "b7503fd1-bf21-4a34-bddc-3d7808a6d216"
|
||||
},
|
||||
"redStar": {
|
||||
"__uuid__": "7bcb74f6-9198-4aea-a494-4dc91e22441a"
|
||||
},
|
||||
"colorStar": {
|
||||
"__uuid__": "6558fdbc-ce62-4135-81fd-449de06bbd38"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "1d8SvOWxVIFbTbscQEnGO9",
|
||||
"sync": false
|
||||
}
|
||||
]
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "3f45b719-6605-44e6-b9f2-058b6c93ec7f",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"subMetas": {}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
const NetManage = require('../../manages/NetManage');
|
||||
import { QualityStar } from '../QualityStar';
|
||||
import { UIBase } from '../UIBase';
|
||||
import { uimanger } from '../UIManger';
|
||||
import { UIUpdateHero } from './UIUpdateHero';
|
||||
@ -21,8 +22,8 @@ export class ChooseHeroUpQuality extends UIBase {
|
||||
@property(cc.Label) timeLabel: cc.Label = null;
|
||||
@property(cc.Label) rateLabel: cc.Label = null;
|
||||
|
||||
@property(cc.Node) beforeStar: cc.Node = null;
|
||||
@property(cc.Node) afterStar: cc.Node = null;
|
||||
@property(QualityStar) beforeStar: QualityStar = null;
|
||||
@property(QualityStar) afterStar: QualityStar = null;
|
||||
|
||||
@property(cc.Label) oldHp: cc.Label = null;
|
||||
@property(cc.Label) oldAtk: cc.Label = null;
|
||||
@ -88,6 +89,9 @@ export class ChooseHeroUpQuality extends UIBase {
|
||||
this.newHp.string = res.new_hero.hp;
|
||||
this.newAtk.string = res.new_hero.atk;
|
||||
this.newDef.string = res.new_hero.def;
|
||||
|
||||
this.beforeStar.initStar(res.old_hero.quality);
|
||||
this.afterStar.initStar(res.new_hero.quality);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
40
assets/scripts/UI/QualityStar.ts
Normal file
40
assets/scripts/UI/QualityStar.ts
Normal file
@ -0,0 +1,40 @@
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export class QualityStar extends cc.Component {
|
||||
@property(cc.SpriteFrame) nullStar: cc.SpriteFrame = null;
|
||||
@property(cc.SpriteFrame) yellowStar: cc.SpriteFrame = null;
|
||||
@property(cc.SpriteFrame) redStar: cc.SpriteFrame = null;
|
||||
@property(cc.SpriteFrame) colorStar: cc.SpriteFrame = null;
|
||||
|
||||
initStar(quality: number) {
|
||||
if (quality > 0 && quality <= 5) {
|
||||
for (let i = 0; i < this.node.children.length; i += 1) {
|
||||
this.node.children[i].getComponent(cc.Sprite).spriteFrame =
|
||||
this.nullStar;
|
||||
}
|
||||
for (let i = 0; i < quality; i += 1) {
|
||||
this.node.children[i].getComponent(cc.Sprite).spriteFrame =
|
||||
this.yellowStar;
|
||||
}
|
||||
} else if (quality > 5 && quality <= 10) {
|
||||
for (let i = 0; i < this.node.children.length; i += 1) {
|
||||
this.node.children[i].getComponent(cc.Sprite).spriteFrame =
|
||||
this.yellowStar;
|
||||
}
|
||||
for (let i = 0; i < quality - 5; i += 1) {
|
||||
this.node.children[i].getComponent(cc.Sprite).spriteFrame =
|
||||
this.redStar;
|
||||
}
|
||||
} else if (quality > 10 && quality <= 15) {
|
||||
for (let i = 0; i < this.node.children.length; i += 1) {
|
||||
this.node.children[i].getComponent(cc.Sprite).spriteFrame =
|
||||
this.redStar;
|
||||
}
|
||||
for (let i = 0; i < quality - 10; i += 1) {
|
||||
this.node.children[i].getComponent(cc.Sprite).spriteFrame =
|
||||
this.colorStar;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
9
assets/scripts/UI/QualityStar.ts.meta
Normal file
9
assets/scripts/UI/QualityStar.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "3cae6f98-382a-4bd1-988c-917c17882862",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
@ -6,6 +6,7 @@ import {
|
||||
import NetManage, { getItemList } from '../../manages/NetManage';
|
||||
|
||||
import { UIUpdateHero } from '../Academy/UIUpdateHero';
|
||||
import { QualityStar } from '../QualityStar';
|
||||
import { UIBase } from '../UIBase';
|
||||
import { uimanger, UIManger } from '../UIManger';
|
||||
|
||||
@ -83,6 +84,9 @@ export class UIHeroinfo extends UIBase {
|
||||
@property(cc.ProgressBar) pveBar: cc.ProgressBar = null;
|
||||
@property(cc.Label) pveget: cc.Label = null;
|
||||
|
||||
@property(QualityStar) star: QualityStar = null;
|
||||
@property(cc.Label) lb_lv: cc.Label = null;
|
||||
|
||||
private hero_id = 0;
|
||||
private allSkins = [];
|
||||
private curentBuyId = 0;
|
||||
@ -110,8 +114,8 @@ export class UIHeroinfo extends UIBase {
|
||||
}
|
||||
|
||||
init(data: any) {
|
||||
console.log(`hero data---${JSON.stringify(data)}`);
|
||||
|
||||
this.star.initStar(data.quality);
|
||||
this.lb_lv.string = data.hero_lv;
|
||||
var lefttime = data.unlock_lefttime;
|
||||
if (data.lock_type == 3) {
|
||||
this.showWanted();
|
||||
|
@ -1,6 +1,7 @@
|
||||
var SDKManage = require('SDKManage');
|
||||
var gameConfig = require('gameConfig');
|
||||
const { uimanger } = require('../UIManger');
|
||||
const { QualityStar } = require('../QualityStar');
|
||||
cc.Class({
|
||||
extends: cc.Component,
|
||||
|
||||
@ -47,6 +48,16 @@ cc.Class({
|
||||
default: null,
|
||||
type: cc.Label,
|
||||
},
|
||||
|
||||
qualityStar: {
|
||||
default: null,
|
||||
type: QualityStar,
|
||||
},
|
||||
|
||||
lb_lv: {
|
||||
default: null,
|
||||
type: cc.Label,
|
||||
},
|
||||
},
|
||||
|
||||
showWanted() {
|
||||
@ -56,6 +67,9 @@ cc.Class({
|
||||
initdata(v) {
|
||||
this._data = v;
|
||||
|
||||
if (this.qualityStar) this.qualityStar.initStar(v.quality);
|
||||
if (this.lb_lv) this.lb_lv.string = 'Lv.' + v.hero_lv;
|
||||
|
||||
if (v != 0) {
|
||||
this.node.active = true;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user