Commit 079450d0 authored by 李维's avatar 李维

增加左侧激活按钮

激活动画图标还在制作
parent 7c8f0d91
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1024,
"height": 1024,
"width": 512,
"height": 512,
"platformSettings": {},
"subMetas": {
"ipw_finger_click_tex": {
......
......@@ -88,18 +88,21 @@
},
{
"__id__": 80
},
{
"__id__": 86
}
],
"_active": true,
"_components": [
{
"__id__": 116
"__id__": 122
},
{
"__id__": 117
"__id__": 123
},
{
"__id__": 118
"__id__": 124
}
],
"_prefab": null,
......@@ -3834,7 +3837,7 @@
},
{
"__type__": "cc.Node",
"_name": "userInfo",
"_name": "leftButtons",
"_objFlags": 0,
"_parent": {
"__id__": 2
......@@ -3842,21 +3845,314 @@
"_children": [
{
"__id__": 81
}
],
"_active": true,
"_components": [
{
"__id__": 84
},
{
"__id__": 86
"__id__": 85
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-550,
250,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "96FDIwiShE4pa8HomB2UWy"
},
{
"__type__": "cc.Node",
"_name": "showActiveBtn",
"_objFlags": 0,
"_parent": {
"__id__": 80
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 82
},
{
"__id__": 107
"__id__": 83
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 54,
"height": 57
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-28.5,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "f4VnMg6aJMMLPKFlK449KT"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "5e9C/AY11Kc5z1S1qaWGJ1"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "221cb354-ffbc-42df-8d06-a59eabf188b5"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "d7rAm2SCBG1rjtmU0J/fIE"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 40,
"_right": 0,
"_top": 110,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "95Bmvw5Z5FG4pnvJGrQqa8"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 300,
"height": 200
},
"_resize": 0,
"_N$layoutType": 2,
"_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": "f7xPCqLUZCEY1E8glBcZ4M"
},
{
"__type__": "cc.Node",
"_name": "userInfo",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 87
},
{
"__id__": 111
"__id__": 92
},
{
"__id__": 113
},
{
"__id__": 117
}
],
"_active": false,
"_components": [
{
"__id__": 115
"__id__": 121
}
],
"_prefab": null,
......@@ -3912,22 +4208,22 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 86
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 82
"__id__": 88
},
{
"__id__": 83
"__id__": 89
},
{
"__id__": 84
"__id__": 90
},
{
"__id__": 85
"__id__": 91
}
],
"_prefab": null,
......@@ -3983,7 +4279,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
"__id__": 87
},
"_enabled": true,
"_materials": [
......@@ -4015,7 +4311,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
"__id__": 87
},
"_enabled": true,
"alignMode": 2,
......@@ -4042,7 +4338,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
"__id__": 87
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4110,7 +4406,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
"__id__": 87
},
"_enabled": true,
"_id": "a7oMGWaYRMiKv9fGk1f76I"
......@@ -4120,32 +4416,32 @@
"_name": "frame",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 86
},
"_children": [
{
"__id__": 87
"__id__": 93
},
{
"__id__": 89
"__id__": 95
},
{
"__id__": 93
"__id__": 99
},
{
"__id__": 95
"__id__": 101
},
{
"__id__": 97
"__id__": 103
},
{
"__id__": 101
"__id__": 107
}
],
"_active": true,
"_components": [
{
"__id__": 106
"__id__": 112
}
],
"_prefab": null,
......@@ -4201,13 +4497,13 @@
"_name": "headBack",
"_objFlags": 0,
"_parent": {
"__id__": 86
"__id__": 92
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 88
"__id__": 94
}
],
"_prefab": null,
......@@ -4263,7 +4559,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
"__id__": 93
},
"_enabled": true,
"_materials": [
......@@ -4295,17 +4591,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 86
"__id__": 92
},
"_children": [
{
"__id__": 90
"__id__": 96
}
],
"_active": true,
"_components": [
{
"__id__": 92
"__id__": 98
}
],
"_prefab": null,
......@@ -4361,13 +4657,13 @@
"_name": "headImg",
"_objFlags": 0,
"_parent": {
"__id__": 89
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 91
"__id__": 97
}
],
"_prefab": null,
......@@ -4423,7 +4719,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 90
"__id__": 96
},
"_enabled": true,
"_materials": [
......@@ -4455,7 +4751,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 89
"__id__": 95
},
"_enabled": true,
"_materials": [
......@@ -4477,13 +4773,13 @@
"_name": "headTop",
"_objFlags": 0,
"_parent": {
"__id__": 86
"__id__": 92
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 94
"__id__": 100
}
],
"_prefab": null,
......@@ -4539,7 +4835,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
"__id__": 99
},
"_enabled": true,
"_materials": [
......@@ -4571,13 +4867,13 @@
"_name": "nickname",
"_objFlags": 0,
"_parent": {
"__id__": 86
"__id__": 92
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 96
"__id__": 102
}
],
"_prefab": null,
......@@ -4633,7 +4929,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 95
"__id__": 101
},
"_enabled": true,
"_materials": [
......@@ -4666,17 +4962,17 @@
"_name": "goldBg",
"_objFlags": 0,
"_parent": {
"__id__": 86
"__id__": 92
},
"_children": [
{
"__id__": 98
"__id__": 104
}
],
"_active": true,
"_components": [
{
"__id__": 100
"__id__": 106
}
],
"_prefab": null,
......@@ -4732,13 +5028,13 @@
"_name": "goldNumber",
"_objFlags": 0,
"_parent": {
"__id__": 97
"__id__": 103
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 99
"__id__": 105
}
],
"_prefab": null,
......@@ -4794,7 +5090,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 98
"__id__": 104
},
"_enabled": true,
"_materials": [
......@@ -4827,7 +5123,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 97
"__id__": 103
},
"_enabled": true,
"_materials": [
......@@ -4859,20 +5155,20 @@
"_name": "BtnLogout",
"_objFlags": 0,
"_parent": {
"__id__": 86
"__id__": 92
},
"_children": [
{
"__id__": 102
"__id__": 108
}
],
"_active": true,
"_components": [
{
"__id__": 104
"__id__": 110
},
{
"__id__": 105
"__id__": 111
}
],
"_prefab": null,
......@@ -4928,13 +5224,13 @@
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 101
"__id__": 107
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 103
"__id__": 109
}
],
"_prefab": null,
......@@ -4990,7 +5286,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 102
"__id__": 108
},
"_enabled": true,
"_materials": [
......@@ -5023,7 +5319,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 101
"__id__": 107
},
"_enabled": true,
"_materials": [
......@@ -5055,7 +5351,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 101
"__id__": 107
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5123,7 +5419,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
"__id__": 92
},
"_enabled": true,
"_materials": [
......@@ -5155,19 +5451,19 @@
"_name": "btnClose",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 86
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 108
"__id__": 114
},
{
"__id__": 109
"__id__": 115
},
{
"__id__": 110
"__id__": 116
}
],
"_prefab": null,
......@@ -5223,7 +5519,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 107
"__id__": 113
},
"_enabled": true,
"_materials": [
......@@ -5255,7 +5551,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 107
"__id__": 113
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5323,7 +5619,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 107
"__id__": 113
},
"_enabled": true,
"alignMode": 1,
......@@ -5350,19 +5646,19 @@
"_name": "deleteAccount",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 86
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 112
"__id__": 118
},
{
"__id__": 113
"__id__": 119
},
{
"__id__": 114
"__id__": 120
}
],
"_prefab": null,
......@@ -5418,7 +5714,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
"__id__": 117
},
"_enabled": true,
"_materials": [
......@@ -5451,7 +5747,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
"__id__": 117
},
"_enabled": true,
"alignMode": 1,
......@@ -5478,7 +5774,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
"__id__": 117
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5546,7 +5842,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
"__id__": 86
},
"_enabled": true,
"alignMode": 2,
......
......@@ -81,6 +81,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!middleLayer) {
return;
}
if(this.engineType == 'aixuebao') {
const showActiveBtn = cc.find("Canvas/leftButtons/showActiveBtn");
showActiveBtn.active = false;
}
if (middleLayer.getComponent('middleLayer').isLogin == false) {
// 游客
cc.find("Canvas/avatar_border/nick_name").getComponent(cc.Label).string = "游客";
......@@ -269,7 +275,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
buttonOnClick(btnClose, () => {
cc.find('Canvas/userInfo').active = false;
});
// 左侧按钮 - 激活
const showActiveBtn = cc.find("Canvas/leftButtons/showActiveBtn");
buttonOnClick(showActiveBtn, () => {
if(middleLayerComponent.isLogin == false) {
// 游客
// 提示先登录后购买
middleLayerComponent.showConfirm("需要登录后才能使用,去登录吗?", ()=>{
middleLayerComponent.loadOnlineBundle('NJ_login');
});
} else {
// 已经登录 弹出激活框
middleLayerComponent.showActiveWindowDirect && middleLayerComponent.showActiveWindowDirect();
}
});
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
// 整个IF都是用于IOS过审
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment