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
b716f83f
Commit
b716f83f
authored
Sep 03, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c609f9c9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
30 deletions
+43
-30
Alert.ts
egret/libs/new_wx/components/Alert.ts
+2
-2
NoPrizePanel.ts
egret/libs/new_wx/components/NoPrizePanel.ts
+9
-7
PrizePanel.ts
egret/libs/new_wx/components/PrizePanel.ts
+7
-6
FailedPanel.ts
egret/src/panels/FailedPanel.ts
+4
-3
Prize2Panel.ts
egret/src/panels/Prize2Panel.ts
+7
-6
QuitPanel.ts
egret/src/panels/QuitPanel.ts
+2
-1
StartScene.ts
egret/src/startScene/StartScene.ts
+11
-4
submit.json
mock/happyclear/submit.json
+1
-1
No files found.
egret/libs/new_wx/components/Alert.ts
View file @
b716f83f
import
Panel
from
"./Panel"
;
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
StartScene
,
{
createData
}
from
"../../../src/startScene/StartScene"
;
import
StartScene
,
{
createData
,
changeMapScene
}
from
"../../../src/startScene/StartScene"
;
export
default
class
Alert
extends
Panel
{
start
(
data
)
{
super
.
start
(
data
);
...
...
@@ -21,6 +21,6 @@ export default class Alert extends Panel {
hidePanel
()
{
super
.
hidePanel
();
if
(
!
(
SceneCtrl
.
instance
.
currentScene
instanceof
StartScene
))
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
changeMapScene
(
);
}
}
\ No newline at end of file
egret/libs/new_wx/components/NoPrizePanel.ts
View file @
b716f83f
...
...
@@ -4,7 +4,7 @@ import { NetManager } from "../../tw/manager/NetManager";
import
Panel
from
"./Panel"
;
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
{
createData
}
from
"../../../src/startScene/StartScene"
;
import
{
createData
,
changeMapScene
}
from
"../../../src/startScene/StartScene"
;
import
{
DataManager
}
from
"../../tw/manager/DataManager"
;
import
getShowOffPic
from
"../../../src/getShowOffPic"
;
import
{
showShare
}
from
"../../../src/shareCtrl"
;
...
...
@@ -21,7 +21,7 @@ export default class NoPrizePanel extends Panel {
this
[
'shareBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
16
));
if
(
iswx
())
{
getShowOffPic
(
this
.
stage
,
this
);
getShowOffPic
(
this
.
stage
,
this
);
}
else
showShare
(
2
);
},
this
);
...
...
@@ -34,10 +34,12 @@ export default class NoPrizePanel extends Panel {
this
[
'goBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
hidePanel
();
if
(
this
.
_level
+
1
<=
70
)
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
{
level
:
this
.
_level
+
1
});
changeMapScene
(
{
level
:
this
.
_level
+
1
});
else
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
changeMapScene
(
);
},
this
);
}
showlog
()
{
...
...
@@ -46,7 +48,7 @@ export default class NoPrizePanel extends Panel {
onTouchTap_closeBtn
()
{
super
.
onTouchTap_closeBtn
();
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
changeMapScene
(
);
// if (this._level + 1 <= 70)
// SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
// else
...
...
@@ -76,9 +78,9 @@ export default class NoPrizePanel extends Panel {
this
[
'pic3'
].
visible
=
true
;
await
this
.
playAni3
();
}
if
(
nums
>=
1
)
{
if
(
nums
>=
1
)
{
this
[
'light'
].
visible
=
true
;
egret
.
Tween
.
get
(
this
[
'light'
]).
set
({
scaleX
:
0
,
scaleY
:
0
,
alpha
:
0
,}).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
300
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
[
'light'
]).
set
({
scaleX
:
0
,
scaleY
:
0
,
alpha
:
0
,
}).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
300
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
[
'light'
],
{
loop
:
true
}).
to
({
rotation
:
360
},
3000
);
});
}
...
...
egret/libs/new_wx/components/PrizePanel.ts
View file @
b716f83f
...
...
@@ -9,6 +9,7 @@ import { ModuleTypes } from "../types/sceneTypes";
import
Panel
from
"./Panel"
;
import
getShowOffPic
from
"../../../src/getShowOffPic"
;
import
wait
from
"../../new_tc/wait"
;
import
{
changeMapScene
}
from
"../../../src/startScene/StartScene"
;
export
default
class
PrizePanel
extends
Panel
{
_level
;
start
(
data
)
{
...
...
@@ -30,9 +31,9 @@ export default class PrizePanel extends Panel {
this
[
'goBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
hidePanel
();
if
(
this
.
_level
+
1
<=
70
)
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
{
level
:
this
.
_level
+
1
});
changeMapScene
(
{
level
:
this
.
_level
+
1
});
else
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
changeMapScene
(
);
},
this
);
this
.
showlog
();
NetManager
.
ins
.
hc_home
(()
=>
{
},
window
[
'collectRuleId'
]);
...
...
@@ -68,13 +69,13 @@ export default class PrizePanel extends Panel {
this
[
'pic3'
].
visible
=
true
;
await
this
.
playAni3
();
}
if
(
nums
>=
1
)
{
if
(
nums
>=
1
)
{
this
[
'light'
].
visible
=
true
;
egret
.
Tween
.
get
(
this
[
'light'
]).
set
({
scaleX
:
0
,
scaleY
:
0
,
alpha
:
0
,}).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
300
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
[
'light'
]).
set
({
scaleX
:
0
,
scaleY
:
0
,
alpha
:
0
,
}).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
300
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
[
'light'
],
{
loop
:
true
}).
to
({
rotation
:
360
},
3000
);
});
}
}
async
playAni1
()
{
...
...
@@ -100,7 +101,7 @@ export default class PrizePanel extends Panel {
onTouchTap_closeBtn
():
any
{
super
.
onTouchTap_closeBtn
();
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
changeMapScene
(
);
// if (this._level +1 <= 70)
// SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
// else
...
...
egret/src/panels/FailedPanel.ts
View file @
b716f83f
...
...
@@ -2,6 +2,7 @@ import Panel from "../../libs/new_wx/components/Panel";
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
ModuleTypes
}
from
"../../libs/new_wx/types/sceneTypes"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
changeMapScene
}
from
"../startScene/StartScene"
;
export
default
class
FailedPanel
extends
Panel
{
_level
;
...
...
@@ -14,16 +15,16 @@ export default class FailedPanel extends Panel {
this
[
'againBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
hidePanel
();
if
(
this
.
_level
)
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
{
level
:
this
.
_level
});
changeMapScene
(
{
level
:
this
.
_level
});
else
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
changeMapScene
(
);
},
this
);
}
onTouchTap_closeBtn
()
{
super
.
onTouchTap_closeBtn
();
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
changeMapScene
(
);
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
...
...
egret/src/panels/Prize2Panel.ts
View file @
b716f83f
...
...
@@ -9,6 +9,7 @@ import getShowOffPic from "../getShowOffPic";
import
{
showShare
}
from
"../shareCtrl"
;
import
{
iswx
}
from
"../iswx"
;
import
wait
from
"../../libs/new_tc/wait"
;
import
{
changeMapScene
}
from
"../startScene/StartScene"
;
export
default
class
Prize2Panel
extends
Panel
{
_level
;
...
...
@@ -26,7 +27,7 @@ export default class Prize2Panel extends Panel {
this
[
'shareBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
15
));
if
(
iswx
())
{
getShowOffPic
(
this
.
stage
,
this
);
getShowOffPic
(
this
.
stage
,
this
);
}
else
showShare
(
2
);
},
this
);
...
...
@@ -34,9 +35,9 @@ export default class Prize2Panel extends Panel {
this
[
'goBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
hidePanel
();
if
(
this
.
_level
+
1
<=
70
)
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
{
level
:
this
.
_level
+
1
});
changeMapScene
(
{
level
:
this
.
_level
+
1
});
else
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
changeMapScene
(
);
},
this
);
this
.
showlog
();
...
...
@@ -71,9 +72,9 @@ export default class Prize2Panel extends Panel {
this
[
'pic3'
].
visible
=
true
;
await
this
.
playAni3
();
}
if
(
nums
>=
1
)
{
if
(
nums
>=
1
)
{
this
[
'light'
].
visible
=
true
;
egret
.
Tween
.
get
(
this
[
'light'
]).
set
({
scaleX
:
0
,
scaleY
:
0
,
alpha
:
0
,}).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
300
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
[
'light'
]).
set
({
scaleX
:
0
,
scaleY
:
0
,
alpha
:
0
,
}).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
300
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
[
'light'
],
{
loop
:
true
}).
to
({
rotation
:
360
},
3000
);
});
}
...
...
@@ -100,7 +101,7 @@ export default class Prize2Panel extends Panel {
}
onTouchTap_closeBtn
():
any
{
super
.
onTouchTap_closeBtn
();
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
changeMapScene
(
);
}
get
picBigWidth
()
{
return
510
};
...
...
egret/src/panels/QuitPanel.ts
View file @
b716f83f
...
...
@@ -3,6 +3,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import
{
getlogItem
}
from
"../Main"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
ModuleTypes
}
from
"../../libs/new_wx/types/sceneTypes"
;
import
{
changeMapScene
}
from
"../startScene/StartScene"
;
export
default
class
QuitPanel
extends
Panel
{
_level
;
...
...
@@ -20,7 +21,7 @@ export default class QuitPanel extends Panel {
this
[
'quitBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
18
));
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
changeMapScene
(
);
},
this
);
this
.
showlog
();
...
...
egret/src/startScene/StartScene.ts
View file @
b716f83f
...
...
@@ -14,8 +14,8 @@ export default class StartScene extends Scene {
level
;
async
start
(
data
?)
{
super
.
start
();
if
(
data
)
this
.
level
=
data
.
level
;
if
(
data
)
this
.
level
=
data
.
level
;
this
[
'container1'
].
x
=
20
;
this
[
'container4'
].
mask
=
this
[
'progressmask'
];
this
[
'maskwrapper'
].
mask
=
this
[
'progressmask2'
];
...
...
@@ -23,7 +23,7 @@ export default class StartScene extends Scene {
this
[
'progressmask2'
].
scaleX
=
0
;
this
[
'percentTxt'
].
text
=
`0%`
;
if
(
data
&&
Array
.
isArray
(
data
))
{
if
(
data
&&
Array
.
isArray
(
data
))
{
this
[
'container3'
].
addChild
(
data
[
0
]);
this
[
'container2'
].
addChild
(
data
[
1
]);
this
[
'container1'
].
addChild
(
data
[
2
]);
...
...
@@ -80,7 +80,7 @@ export default class StartScene extends Scene {
setTimeout
(()
=>
{
egret
.
Tween
.
removeTweens
(
this
[
'progressmask2'
]);
egret
.
Tween
.
get
(
this
[
'progressmask2'
]).
to
({
scaleX
:
1
},
200
).
wait
(
200
).
call
(()
=>
{
d
.
level
=
this
.
level
;
d
.
level
=
this
.
level
;
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
MAP_SCENE
,
d
);
});
this
[
'percentTxt'
].
text
=
`100%`
...
...
@@ -91,6 +91,13 @@ export default class StartScene extends Scene {
get
skinKey
()
{
return
'Start'
}
}
export
const
changeMapScene
=
(
p
?)
=>
{
const
data
=
createData
();
if
(
p
)
data
.
level
=
p
.
level
;
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
MAP_SCENE
,
data
);
}
export
const
createData
=
()
=>
{
const
startSceneData
:
any
=
{};
startSceneData
.
top
=
new
MapTopPart
();
...
...
mock/happyclear/submit.json
View file @
b716f83f
...
...
@@ -4,7 +4,7 @@
"desc"
:
"OK"
,
"timestamp"
:
1566546925981
,
"data"
:{
"prizeType"
:
null
,
"prizeType"
:
2
,
"prizeResponse"
:{
"errorCode"
:
null
,
"changeMoney"
:
190
,
...
...
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