fix sceneExploreNew blank screen
Showing
17 changed files
with
52 additions
and
45 deletions
This diff is collapsed.
Click to expand it.
... | @@ -13,6 +13,7 @@ cc.Class({ | ... | @@ -13,6 +13,7 @@ cc.Class({ |
13 | extends: TVCanvas, | 13 | extends: TVCanvas, |
14 | 14 | ||
15 | properties: { | 15 | properties: { |
16 | _speed: 0, | ||
16 | PFB_TYPE: { | 17 | PFB_TYPE: { |
17 | default: null, | 18 | default: null, |
18 | type: cc.Prefab, | 19 | type: cc.Prefab, |
... | @@ -24,7 +25,7 @@ cc.Class({ | ... | @@ -24,7 +25,7 @@ cc.Class({ |
24 | }, | 25 | }, |
25 | 26 | ||
26 | start: function () { | 27 | start: function () { |
27 | this.bg_long.getComponent(cc.Animation).play(); //播放动画 | 28 | // this.bg_long.getComponent(cc.Animation).play(); //动画滚动背景,因为动画背景尺寸较大,再真机中黑屏 |
28 | 29 | ||
29 | // this.schedule(()=>{ | 30 | // this.schedule(()=>{ |
30 | // this.bg_long.getComponent(cc.Animation).pause(); //暂停播放动画 | 31 | // this.bg_long.getComponent(cc.Animation).pause(); //暂停播放动画 |
... | @@ -43,6 +44,13 @@ cc.Class({ | ... | @@ -43,6 +44,13 @@ cc.Class({ |
43 | this._islandOrder = oSceneParameter.order-1; //当前位于哪个岛屿,岛屿从1开始排序,故需要-1 | 44 | this._islandOrder = oSceneParameter.order-1; //当前位于哪个岛屿,岛屿从1开始排序,故需要-1 |
44 | } | 45 | } |
45 | 46 | ||
47 | //------------------滚动背景------------------- | ||
48 | this._speed=0; | ||
49 | this.bg_1 = this.node.getChildByName("bg_1"); | ||
50 | this.bg_2 = this.node.getChildByName("bg_2"); | ||
51 | this.cur_bg = this.bg_1; | ||
52 | //--------------------------------------------- | ||
53 | |||
46 | this._aFocusTargets[1] = []; //弹窗焦点 | 54 | this._aFocusTargets[1] = []; //弹窗焦点 |
47 | this._iSceneStatus = 0; //焦点层级 | 55 | this._iSceneStatus = 0; //焦点层级 |
48 | this._remindString = this.node.getChildByName("Remind").getComponent(cc.Label); | 56 | this._remindString = this.node.getChildByName("Remind").getComponent(cc.Label); |
... | @@ -186,11 +194,13 @@ cc.Class({ | ... | @@ -186,11 +194,13 @@ cc.Class({ |
186 | }, 3); | 194 | }, 3); |
187 | return; | 195 | return; |
188 | } | 196 | } |
189 | this.bg_long.getComponent(cc.Animation).resume(); //播放动画 | 197 | // this.bg_long.getComponent(cc.Animation).resume(); //播放动画 |
198 | this._speed=1; | ||
190 | this.hero.getComponent(dragonBones.ArmatureDisplay).playAnimation("Animation1"); | 199 | this.hero.getComponent(dragonBones.ArmatureDisplay).playAnimation("Animation1"); |
191 | 200 | ||
192 | this.scheduleOnce(() => { | 201 | this.scheduleOnce(() => { |
193 | this.bg_long.getComponent(cc.Animation).pause(); //暂停播放动画 | 202 | // this.bg_long.getComponent(cc.Animation).pause(); //暂停播放动画 |
203 | this._speed=0; | ||
194 | // this.hero.getComponent(dragonBones.ArmatureDisplay)._armature.animation.stop(); //APK不支持 | 204 | // this.hero.getComponent(dragonBones.ArmatureDisplay)._armature.animation.stop(); //APK不支持 |
195 | this.hero.getComponent(dragonBones.ArmatureDisplay).playAnimation("Animation1").stop(); | 205 | this.hero.getComponent(dragonBones.ArmatureDisplay).playAnimation("Animation1").stop(); |
196 | 206 | ||
... | @@ -319,5 +329,18 @@ cc.Class({ | ... | @@ -319,5 +329,18 @@ cc.Class({ |
319 | } | 329 | } |
320 | }, | 330 | }, |
321 | 331 | ||
332 | update: function (dt) { | ||
333 | this.bg_1.x -= this._speed; | ||
334 | this.bg_2.x -= this._speed; | ||
335 | if (this.cur_bg.x <= -1984) { | ||
336 | if (this.cur_bg == this.bg_2) { | ||
337 | this.bg_2.x = this.bg_1.x + 1984; | ||
338 | this.cur_bg = this.bg_1; | ||
339 | } else { | ||
340 | this.bg_1.x = this.bg_2.x + 1970; | ||
341 | this.cur_bg = this.bg_2; | ||
342 | } | ||
343 | } | ||
344 | }, | ||
322 | 345 | ||
323 | }); | 346 | }); | ... | ... |
assets/resources/game/explore_big.jpg
0 → 100644

129 KB
1 | { | 1 | { |
2 | "ver": "2.2.0", | 2 | "ver": "2.2.0", |
3 | "uuid": "154f1aad-5677-4723-a6ea-bed25fb67b49", | 3 | "uuid": "5e6b1288-3d11-4862-bb65-51200bdf45e4", |
4 | "type": "sprite", | 4 | "type": "sprite", |
5 | "wrapMode": "clamp", | 5 | "wrapMode": "clamp", |
6 | "filterMode": "bilinear", | 6 | "filterMode": "bilinear", |
7 | "premultiplyAlpha": false, | 7 | "premultiplyAlpha": false, |
8 | "subMetas": { | 8 | "subMetas": { |
9 | "explore_plus1": { | 9 | "explore_big": { |
10 | "ver": "1.0.4", | 10 | "ver": "1.0.4", |
11 | "uuid": "2a6ce217-b4e3-4c8e-8b70-c8b93ef28c80", | 11 | "uuid": "3f32828b-9061-48fb-a658-e2239afbc62a", |
12 | "rawTextureUuid": "154f1aad-5677-4723-a6ea-bed25fb67b49", | 12 | "rawTextureUuid": "5e6b1288-3d11-4862-bb65-51200bdf45e4", |
13 | "trimType": "auto", | 13 | "trimType": "auto", |
14 | "trimThreshold": 1, | 14 | "trimThreshold": 1, |
15 | "rotated": false, | 15 | "rotated": false, |
... | @@ -17,10 +17,10 @@ | ... | @@ -17,10 +17,10 @@ |
17 | "offsetY": 0, | 17 | "offsetY": 0, |
18 | "trimX": 0, | 18 | "trimX": 0, |
19 | "trimY": 0, | 19 | "trimY": 0, |
20 | "width": 912, | 20 | "width": 1984, |
21 | "height": 1110, | 21 | "height": 1108, |
22 | "rawWidth": 912, | 22 | "rawWidth": 1984, |
23 | "rawHeight": 1110, | 23 | "rawHeight": 1108, |
24 | "borderTop": 0, | 24 | "borderTop": 0, |
25 | "borderBottom": 0, | 25 | "borderBottom": 0, |
26 | "borderLeft": 0, | 26 | "borderLeft": 0, | ... | ... |

63 KB

77.6 KB
1 | { | ||
2 | "ver": "2.2.0", | ||
3 | "uuid": "08ea60a8-ed09-414d-aa25-34e6139d2942", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "subMetas": { | ||
9 | "explore_plus2": { | ||
10 | "ver": "1.0.4", | ||
11 | "uuid": "b9ee3250-661a-448e-8e7b-cf4dd91afe8e", | ||
12 | "rawTextureUuid": "08ea60a8-ed09-414d-aa25-34e6139d2942", | ||
13 | "trimType": "auto", | ||
14 | "trimThreshold": 1, | ||
15 | "rotated": false, | ||
16 | "offsetX": 0, | ||
17 | "offsetY": 0, | ||
18 | "trimX": 0, | ||
19 | "trimY": 0, | ||
20 | "width": 1520, | ||
21 | "height": 720, | ||
22 | "rawWidth": 1520, | ||
23 | "rawHeight": 720, | ||
24 | "borderTop": 0, | ||
25 | "borderBottom": 0, | ||
26 | "borderLeft": 0, | ||
27 | "borderRight": 0, | ||
28 | "subMetas": {} | ||
29 | } | ||
30 | } | ||
31 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -1804,6 +1804,7 @@ e("ListView"), e("ListCell"), e("xmlToJSON"), e("GlobalValue")); | ... | @@ -1804,6 +1804,7 @@ e("ListView"), e("ListCell"), e("xmlToJSON"), e("GlobalValue")); |
1804 | cc.Class({ | 1804 | cc.Class({ |
1805 | extends: a, | 1805 | extends: a, |
1806 | properties: { | 1806 | properties: { |
1807 | _speed: 0, | ||
1807 | PFB_TYPE: { | 1808 | PFB_TYPE: { |
1808 | default: null, | 1809 | default: null, |
1809 | type: cc.Prefab | 1810 | type: cc.Prefab |
... | @@ -1815,7 +1816,6 @@ type: cc.Prefab | ... | @@ -1815,7 +1816,6 @@ type: cc.Prefab |
1815 | }, | 1816 | }, |
1816 | start: function() { | 1817 | start: function() { |
1817 | var e = this; | 1818 | var e = this; |
1818 | this.bg_long.getComponent(cc.Animation).play(); | ||
1819 | this.scheduleOnce(function() { | 1819 | this.scheduleOnce(function() { |
1820 | e.bg_long.getComponent(cc.Animation).pause(); | 1820 | e.bg_long.getComponent(cc.Animation).pause(); |
1821 | }, 0); | 1821 | }, 0); |
... | @@ -1824,6 +1824,10 @@ onLoad: function() { | ... | @@ -1824,6 +1824,10 @@ onLoad: function() { |
1824 | this._super(); | 1824 | this._super(); |
1825 | var e = this._cApplication.getTopSceneParameter(); | 1825 | var e = this._cApplication.getTopSceneParameter(); |
1826 | e && (this._islandOrder = e.order - 1); | 1826 | e && (this._islandOrder = e.order - 1); |
1827 | this._speed = 0; | ||
1828 | this.bg_1 = this.node.getChildByName("bg_1"); | ||
1829 | this.bg_2 = this.node.getChildByName("bg_2"); | ||
1830 | this.cur_bg = this.bg_1; | ||
1827 | this._aFocusTargets[1] = []; | 1831 | this._aFocusTargets[1] = []; |
1828 | this._iSceneStatus = 0; | 1832 | this._iSceneStatus = 0; |
1829 | this._remindString = this.node.getChildByName("Remind").getComponent(cc.Label); | 1833 | this._remindString = this.node.getChildByName("Remind").getComponent(cc.Label); |
... | @@ -1915,10 +1919,10 @@ this.backAScene(); | ... | @@ -1915,10 +1919,10 @@ this.backAScene(); |
1915 | nextTask: function() { | 1919 | nextTask: function() { |
1916 | var e = this; | 1920 | var e = this; |
1917 | if (5 != this.totalTask) { | 1921 | if (5 != this.totalTask) { |
1918 | this.bg_long.getComponent(cc.Animation).resume(); | 1922 | this._speed = 1; |
1919 | this.hero.getComponent(dragonBones.ArmatureDisplay).playAnimation("Animation1"); | 1923 | this.hero.getComponent(dragonBones.ArmatureDisplay).playAnimation("Animation1"); |
1920 | this.scheduleOnce(function() { | 1924 | this.scheduleOnce(function() { |
1921 | e.bg_long.getComponent(cc.Animation).pause(); | 1925 | e._speed = 0; |
1922 | e.hero.getComponent(dragonBones.ArmatureDisplay).playAnimation("Animation1").stop(); | 1926 | e.hero.getComponent(dragonBones.ArmatureDisplay).playAnimation("Animation1").stop(); |
1923 | var t = e.random(1, 7); | 1927 | var t = e.random(1, 7); |
1924 | cc.log("随机数--------\x3e" + t); | 1928 | cc.log("随机数--------\x3e" + t); |
... | @@ -2020,6 +2024,17 @@ this.doTVLinkAction(i[n]); | ... | @@ -2020,6 +2024,17 @@ this.doTVLinkAction(i[n]); |
2020 | } catch (e) { | 2024 | } catch (e) { |
2021 | cc.log("runTVLinkAction Exception..." + e); | 2025 | cc.log("runTVLinkAction Exception..." + e); |
2022 | } | 2026 | } |
2027 | }, | ||
2028 | update: function(e) { | ||
2029 | this.bg_1.x -= this._speed; | ||
2030 | this.bg_2.x -= this._speed; | ||
2031 | if (this.cur_bg.x <= -1984) if (this.cur_bg == this.bg_2) { | ||
2032 | this.bg_2.x = this.bg_1.x + 1984; | ||
2033 | this.cur_bg = this.bg_1; | ||
2034 | } else { | ||
2035 | this.bg_1.x = this.bg_2.x + 1970; | ||
2036 | this.cur_bg = this.bg_2; | ||
2037 | } | ||
2023 | } | 2038 | } |
2024 | }); | 2039 | }); |
2025 | cc._RF.pop(); | 2040 | cc._RF.pop(); | ... | ... |
This diff is collapsed.
Click to expand it.
This file is too large to display.
build/jsb-link/res/import/06/06cec0d43.json
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
No preview for this file type
-
Please register or sign in to post a comment