Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
xiaoxiaole
Commits
f0ccd722
Commit
f0ccd722
authored
Mar 24, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5548bfb0
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
13 deletions
+64
-13
help_light.png
egret/resource/assets/help/help_light.png
+0
-0
scratch_fail.svga
egret/resource/assets/svgas/scratch_fail.svga
+0
-0
scratch_standby.svga
egret/resource/assets/svgas/scratch_standby.svga
+0
-0
scratch_success.svga
egret/resource/assets/svgas/scratch_success.svga
+0
-0
default.res.json
egret/resource/default.res.json
+9
-0
HelpScratchSkin.exml
egret/resource/skins/HelpScratchSkin.exml
+5
-4
HelpScratchPanel.ts
egret/src/panels/help/HelpScratchPanel.ts
+50
-9
No files found.
egret/resource/assets/help/help_light.png
0 → 100644
View file @
f0ccd722
352 KB
egret/resource/assets/svgas/scratch_fail.svga
0 → 100644
View file @
f0ccd722
File added
egret/resource/assets/svgas/scratch_standby.svga
0 → 100644
View file @
f0ccd722
File added
egret/resource/assets/svgas/scratch_success.svga
0 → 100644
View file @
f0ccd722
File added
egret/resource/default.res.json
View file @
f0ccd722
...
@@ -243,6 +243,10 @@
...
@@ -243,6 +243,10 @@
{
{
"keys"
:
"help_invite2_text4_png,help_invite2_text3_png,help_invite2_text2_png,help_invite2_text_png,help_invite2_btn2_png,help_invite2_btn_png,help_invite_text_png,help_invite_success_txt_png,help_invite_success_btn_png,help_invite_fail_text4_png,help_invite_fail_text3_png,help_invite_fail_text2_png,help_invite_fail_text1_png,help_invite_fail_btn_png,help_invite_btn1_png,help_invite_bg_png,help_closebtn1_png,help_blood_success_text2_png,help_blood_success_text_png,help_blood_fail_text4_png,help_blood_fail_text3_png,help_blood_fail_text2_png,help_blood_fail_text_png,help_blood_fail_btn_png,help_blood_1_text_png,help_blood_1_btn_png"
,
"keys"
:
"help_invite2_text4_png,help_invite2_text3_png,help_invite2_text2_png,help_invite2_text_png,help_invite2_btn2_png,help_invite2_btn_png,help_invite_text_png,help_invite_success_txt_png,help_invite_success_btn_png,help_invite_fail_text4_png,help_invite_fail_text3_png,help_invite_fail_text2_png,help_invite_fail_text1_png,help_invite_fail_btn_png,help_invite_btn1_png,help_invite_bg_png,help_closebtn1_png,help_blood_success_text2_png,help_blood_success_text_png,help_blood_fail_text4_png,help_blood_fail_text3_png,help_blood_fail_text2_png,help_blood_fail_text_png,help_blood_fail_btn_png,help_blood_1_text_png,help_blood_1_btn_png"
,
"name"
:
"helpGroup"
"name"
:
"helpGroup"
},
{
"name"
:
"preload"
,
"keys"
:
"help_light_png"
}
}
],
],
"resources"
:
[
"resources"
:
[
...
@@ -5081,6 +5085,11 @@
...
@@ -5081,6 +5085,11 @@
"url"
:
"assets/help/help_invite_btn1.png"
,
"url"
:
"assets/help/help_invite_btn1.png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"name"
:
"help_invite_btn1_png"
"name"
:
"help_invite_btn1_png"
},
{
"name"
:
"help_light_png"
,
"type"
:
"image"
,
"url"
:
"assets/help/help_light.png"
}
}
]
]
}
}
\ No newline at end of file
egret/resource/skins/HelpScratchSkin.exml
View file @
f0ccd722
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"HelpScratchSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
class=
"HelpScratchSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
y=
"240"
horizontalCenter=
"0"
source=
"help_invite_bg_png"
/>
<e:Image
id=
"light"
source=
"help_light_png"
y=
"401.34"
x=
"381.82"
anchorOffsetX=
"381.82"
anchorOffsetY=
"421.22"
/>
<e:Group
y=
"695"
horizontalCenter=
"0"
>
<e:Image
y=
"352.12"
horizontalCenter=
"0"
source=
"help_invite_bg_png"
/>
<e:Group
y=
"807.12"
horizontalCenter=
"0"
>
<e:Image
id=
"helpbtn"
y=
"0"
source=
"help_invite_btn1_png"
horizontalCenter=
"0"
/>
<e:Image
id=
"helpbtn"
y=
"0"
source=
"help_invite_btn1_png"
horizontalCenter=
"0"
/>
<e:Image
id=
"go2btn"
x=
"0"
y=
"0"
source=
"help_invite_fail_btn_png"
visible=
"false"
/>
<e:Image
id=
"go2btn"
x=
"0"
y=
"0"
source=
"help_invite_fail_btn_png"
visible=
"false"
/>
<e:Image
id=
"go1btn"
source=
"help_invite_success_btn_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"go1btn"
source=
"help_invite_success_btn_png"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
</e:Group>
<e:Group
y=
"
294
"
width=
"100%"
horizontalCenter=
"0"
>
<e:Group
y=
"
406.12
"
width=
"100%"
horizontalCenter=
"0"
>
<e:Image
id=
"txt_standby"
y=
"0"
horizontalCenter=
"0"
source=
"help_invite_text_png"
visible=
"false"
/>
<e:Image
id=
"txt_standby"
y=
"0"
horizontalCenter=
"0"
source=
"help_invite_text_png"
visible=
"false"
/>
<e:Image
id=
"txt_success"
horizontalCenter=
"0"
source=
"help_invite_success_txt_png"
visible=
"false"
/>
<e:Image
id=
"txt_success"
horizontalCenter=
"0"
source=
"help_invite_success_txt_png"
visible=
"false"
/>
<e:Image
id=
"txt_error0000024"
source=
"help_invite_fail_text1_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error0000024"
source=
"help_invite_fail_text1_png"
horizontalCenter=
"0"
visible=
"false"
/>
...
@@ -14,5 +15,5 @@
...
@@ -14,5 +15,5 @@
<e:Image
id=
"txt_error0000023"
source=
"help_invite_fail_text3_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error0000023"
source=
"help_invite_fail_text3_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_errorxxxx"
horizontalCenter=
"0"
source=
"help_invite_fail_text4_png"
visible=
"false"
/>
<e:Image
id=
"txt_errorxxxx"
horizontalCenter=
"0"
source=
"help_invite_fail_text4_png"
visible=
"false"
/>
</e:Group>
</e:Group>
<e:Image
id=
"closeBtn"
source=
"help_closebtn1_png"
x=
"613"
y=
"
238
"
/>
<e:Image
id=
"closeBtn"
source=
"help_closebtn1_png"
x=
"613"
y=
"
350.12
"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/src/panels/help/HelpScratchPanel.ts
View file @
f0ccd722
...
@@ -2,21 +2,54 @@ import Panel from "../../../libs/new_wx/components/Panel";
...
@@ -2,21 +2,54 @@ import Panel from "../../../libs/new_wx/components/Panel";
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
{
gotoNextLevel
}
from
"../gotoNextLevel"
;
import
{
gotoNextLevel
}
from
"../gotoNextLevel"
;
import
{
loadSvga
}
from
"../../loadSvga"
;
import
getResPath
from
"../../../libs/new_tc/getResPath"
;
import
{
play2
}
from
"./svgaTool"
;
import
wait
from
"../../../libs/new_tc/wait"
;
export
default
class
HelpScratchPanel
extends
Panel
{
export
default
class
HelpScratchPanel
extends
Panel
{
netCallback
;
netCallback
;
code
;
code
;
start
(
data
)
{
list
:
any
[];
async
start
(
data
)
{
this
.
netCallback
=
data
.
netCallback
;
this
.
netCallback
=
data
.
netCallback
;
this
.
code
=
data
.
code
;
this
.
code
=
data
.
code
;
// NetManager.ins.showLog(getlogItem(87));
egret
.
Tween
.
get
(
this
[
'light'
],
{
loop
:
true
}).
to
({
rotation
:
360
},
5000
);
this
[
'light'
].
visible
=
false
;
this
[
'closeBtn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onclick_closeBtn
,
this
);
this
[
'closeBtn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onclick_closeBtn
,
this
);
this
[
'txt_standby'
].
visible
=
true
;
this
[
'helpbtn'
].
visible
=
true
;
this
.
list
=
await
Promise
.
all
([
loadSvga
(
getResPath
()
+
'resource/assets/svgas/scratch_standby.svga'
),
loadSvga
(
getResPath
()
+
'resource/assets/svgas/scratch_success.svga'
),
loadSvga
(
getResPath
()
+
'resource/assets/svgas/scratch_fail.svga'
),
]);
this
[
'go2btn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onclick_gobtn
,
this
);
this
[
'go2btn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onclick_gobtn
,
this
);
this
[
'go1btn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onclick_gobtn
,
this
);
this
[
'go1btn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onclick_gobtn
,
this
);
this
[
'helpbtn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onClick
,
this
);
this
[
'helpbtn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onClick
,
this
);
this
[
'txt_standby'
].
visible
=
true
;
this
[
'helpbtn'
].
visible
=
true
;
const
w
=
[
313
,
433
,
356
];
const
y
=
[
180
,
20
,
140
];
this
.
list
.
forEach
((
i
,
index
)
=>
{
i
.
gotoAndStop
(
1
);
this
.
addChildAt
(
i
,
1
);
i
.
visible
=
false
;
i
.
touchEnabled
=
false
;
i
.
anchorOffsetX
=
w
[
index
]
/
2
;
i
.
x
=
750
/
2
;
i
.
y
=
y
[
index
];
});
wait
(
1000
).
then
(
async
()
=>
{
this
.
list
[
0
].
visible
=
true
;
await
play2
(
this
.
list
[
0
]);
this
[
'light'
].
visible
=
true
;
});
}
}
onclick_closeBtn
()
{
onclick_closeBtn
()
{
...
@@ -29,18 +62,25 @@ export default class HelpScratchPanel extends Panel {
...
@@ -29,18 +62,25 @@ export default class HelpScratchPanel extends Panel {
}
}
onClick
()
{
onClick
()
{
this
[
'light'
].
visible
=
false
;
this
[
'helpbtn'
].
visible
=
false
;
this
[
'helpbtn'
].
visible
=
false
;
this
.
list
[
0
].
visible
=
false
;
const
_code
=
this
.
code
.
slice
(
8
);
const
_code
=
this
.
code
.
slice
(
8
);
NetManager
.
ins
.
scratchDoHelp
((
success
,
res
)
=>
{
NetManager
.
ins
.
scratchDoHelp
(
async
(
success
,
res
)
=>
{
this
.
netCallback
();
this
.
netCallback
();
this
[
'txt_standby'
].
visible
=
false
;
this
[
'txt_standby'
].
visible
=
false
;
if
(
success
)
{
if
(
success
)
{
this
[
'go1btn'
].
visible
=
true
;
this
[
'go1btn'
].
visible
=
true
;
this
[
'txt_success'
].
visible
=
true
;
this
[
'txt_success'
].
visible
=
true
;
this
.
list
[
1
].
visible
=
true
;
await
play2
(
this
.
list
[
1
]);
this
[
'light'
].
visible
=
true
;
}
else
{
}
else
{
this
[
'go2btn'
].
visible
=
true
;
this
[
'go2btn'
].
visible
=
true
;
this
.
list
[
2
].
visible
=
true
;
await
play2
(
this
.
list
[
2
]);
var
codeMsgs
=
{
var
codeMsgs
=
{
"0000024"
:
"今日刮卡次数已达到上线限哦~"
,
"0000024"
:
"今日刮卡次数已达到上线限哦~"
,
"0000022"
:
"不可以给自己刮哦~"
,
"0000022"
:
"不可以给自己刮哦~"
,
...
@@ -51,6 +91,7 @@ export default class HelpScratchPanel extends Panel {
...
@@ -51,6 +91,7 @@ export default class HelpScratchPanel extends Panel {
}
else
{
}
else
{
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
}
}
}
}
// switch (true) {
// switch (true) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment