Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new-kickball
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
new-kickball
Commits
db038a85
Commit
db038a85
authored
Jun 22, 2019
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
9d5f3970
Changes
30
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
6225 additions
and
47 deletions
+6225
-47
SceneStart_20190622110040.ts
.history/assets/scripts/scenes/SceneStart_20190622110040.ts
+234
-0
SceneStart_20190622110139.ts
.history/assets/scripts/scenes/SceneStart_20190622110139.ts
+234
-0
SceneStart_20190622110957.ts
.history/assets/scripts/scenes/SceneStart_20190622110957.ts
+240
-0
SceneStart_20190622111031.ts
.history/assets/scripts/scenes/SceneStart_20190622111031.ts
+240
-0
SceneStart_20190622111132.ts
.history/assets/scripts/scenes/SceneStart_20190622111132.ts
+240
-0
SceneStart_20190622111144.ts
.history/assets/scripts/scenes/SceneStart_20190622111144.ts
+240
-0
SceneStart_20190622111150.ts
.history/assets/scripts/scenes/SceneStart_20190622111150.ts
+240
-0
SceneStart_20190622111251.ts
.history/assets/scripts/scenes/SceneStart_20190622111251.ts
+240
-0
SceneStart_20190622111631.ts
.history/assets/scripts/scenes/SceneStart_20190622111631.ts
+240
-0
SceneStart_20190622111730.ts
.history/assets/scripts/scenes/SceneStart_20190622111730.ts
+239
-0
SceneStart_20190622112026.ts
.history/assets/scripts/scenes/SceneStart_20190622112026.ts
+277
-0
SceneStart_20190622112035.ts
.history/assets/scripts/scenes/SceneStart_20190622112035.ts
+278
-0
SceneStart_20190622112045.ts
.history/assets/scripts/scenes/SceneStart_20190622112045.ts
+274
-0
SceneStart_20190622112415.ts
.history/assets/scripts/scenes/SceneStart_20190622112415.ts
+274
-0
SceneStart_20190622112730.ts
.history/assets/scripts/scenes/SceneStart_20190622112730.ts
+274
-0
SceneStart_20190622112745.ts
.history/assets/scripts/scenes/SceneStart_20190622112745.ts
+274
-0
SceneStart_20190622112754.ts
.history/assets/scripts/scenes/SceneStart_20190622112754.ts
+274
-0
SceneStart_20190622112944.ts
.history/assets/scripts/scenes/SceneStart_20190622112944.ts
+280
-0
SceneStart_20190622113016.ts
.history/assets/scripts/scenes/SceneStart_20190622113016.ts
+280
-0
SceneStart_20190622113706.ts
.history/assets/scripts/scenes/SceneStart_20190622113706.ts
+268
-0
SceneStart_20190622113845.ts
.history/assets/scripts/scenes/SceneStart_20190622113845.ts
+279
-0
SceneStart_20190622114034.ts
.history/assets/scripts/scenes/SceneStart_20190622114034.ts
+280
-0
SceneStart_20190622114057.ts
.history/assets/scripts/scenes/SceneStart_20190622114057.ts
+280
-0
doJoin_20190622112448.json
.history/mock/hdtool/recon/doJoin_20190622112448.json
+1
-0
getOrderStatus_20190622114533.json
...tory/mock/hdtool/recon/getOrderStatus_20190622114533.json
+34
-0
getOrderStatus_20190622114629.json
...tory/mock/hdtool/recon/getOrderStatus_20190622114629.json
+65
-0
main.scene
assets/scenes/main.scene
+53
-1
SceneStart.ts
assets/scripts/scenes/SceneStart.ts
+56
-9
doJoin.json
mock/hdtool/recon/doJoin.json
+1
-1
MustCompile.ts
src/generated/MustCompile.ts
+36
-36
No files found.
.history/assets/scripts/scenes/SceneStart_20190622110040.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getNgameStartStatus
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
this
.
grabState
=
true
;
this
.
hasPrize
=
true
;
/* if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
} */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getNgameStartStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
(
data
?)
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
console
.
log
(
data
)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622110139.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getNgameStartStatus
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getNgameStartStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
(
data
?)
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
console
.
log
(
data
)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622110957.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getNgameStartStatus
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
/* if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
} */
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getNgameStartStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
(
data
?)
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
console
.
log
(
data
)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622111031.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getNgameStartStatus
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
/* if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
} */
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getNgameStartStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622111132.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getNgameStartStatus
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
/* if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
} */
this
.
broadcast
(
'callApi'
,
1
,
'doJoinData'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getNgameStartStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622111144.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getNgameStartStatus
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
/* if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
} */
this
.
broadcast
(
'callApi'
,
1
,
'doJoinData'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoinData
);
this
.
broadcast
(
'callApi'
,
1
,
'getNgameStartStatus'
,
{
orderId
:
this
.
doJoinData
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoinData
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622111150.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getNgameStartStatus
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
/* if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
} */
this
.
broadcast
(
'callApi'
,
1
,
'doJoinData'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoinData
);
// this.broadcast('callApi', 1, 'getNgameStartStatus', {
// orderId: this.doJoinData
// });
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoinData
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622111251.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getNgameStartStatus
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
/* if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
} */
this
.
broadcast
(
'callApi'
,
1
,
'doJoinData'
,
{
/* activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId */
});
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoinData
);
// this.broadcast('callApi', 1, 'getNgameStartStatus', {
// orderId: this.doJoinData
// });
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoinData
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622111631.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getNgameStartStatus
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoinData
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoinData
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoinData
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622111730.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoinData
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoinData
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoinData
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622112026.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoinData
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoinData
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoinData
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622112035.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoinData
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoinData
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoinData
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622112045.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoinData
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoinData
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoinData
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622112415.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoinData'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoinData'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoinData
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoinData
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoinData
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622112730.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoinData
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoinData
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoinData
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoinData
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622112745.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622112754.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
//console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
//console.log(this.getNgameStartStatus)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622112944.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
/* if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
} */
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
()
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
//console.log(data)
}
onGot_getNgameStartStatus
()
{
//console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
//console.log(this.getNgameStartStatus)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622113016.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
/* if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
} */
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
/* this.broadcast('callApi', 1, 'doJoinData', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
(
data
?)
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
console
.
log
(
data
)
}
onGot_getNgameStartStatus
()
{
//console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
//console.log(this.getNgameStartStatus)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622113706.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
hasPrize
=
false
;
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
(
data
?)
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
console
.
log
(
data
)
}
onGot_getNgameStartStatus
()
{
//console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
//console.log(this.getNgameStartStatus)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622113845.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
}
}
else
{
this
.
hasPrize
=
false
;
}
}
hasGraDo
(){
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
else
{
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
(
data
?)
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
console
.
log
(
data
)
}
onGot_getNgameStartStatus
()
{
//console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
//console.log(this.getNgameStartStatus)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622114034.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
hasGraDo
()
this
.
pingzi_2Transform
.
alpha
=
1
//this.gouzi_pingziTransform.alpha=0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
}
}
else
{
this
.
hasPrize
=
false
;
}
}
hasGraDo
(){
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
else
{
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
(
data
?)
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
console
.
log
(
data
)
}
onGot_getNgameStartStatus
()
{
//console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
//console.log(this.getNgameStartStatus)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/assets/scripts/scenes/SceneStart_20190622114057.ts
0 → 100644
View file @
db038a85
/**
* Created by rockyl on 2019-04-09.
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
,
Tween
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
Wave
from
'components/animation/Wave'
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
createTween
,
ease
}
from
"scilla"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
getOrderStatus
:
dynamic
;
countTxt
:
Entity
;
startbtn
:
Entity
;
recordbtn
:
Entity
;
pingziFront
:
Entity
;
pingziBack
:
Entity
;
rankbtn
:
Entity
;
rulebtn
:
Entity
;
gouzi
:
Entity
;
pingzi_1
:
Entity
;
pingzi_2
:
Entity
;
gouzi_pingzi
:
Entity
;
private
startBtnAnimation
;
pingziFrontTransform
:
Transform
;
pingziBackTransform
:
Transform
;
gouziTransform
:
Transform
;
pingzi_1Transform
:
Transform
;
pingzi_2Transform
:
Transform
;
gouzi_pingziTransform
:
Transform
;
onAwake
()
{
super
.
onAwake
();
this
.
setCountText
(
''
);
this
.
startBtnAnimation
=
this
.
startbtn
.
getComponent
(
Transform
);
this
.
pingziFrontTransform
=
this
.
pingziFront
.
getComponent
(
Transform
);
this
.
pingziBackTransform
=
this
.
pingziBack
.
getComponent
(
Transform
);
this
.
gouziTransform
=
this
.
gouzi
.
getComponent
(
Transform
);
this
.
pingzi_1Transform
=
this
.
pingzi_1
.
getComponent
(
Transform
);
this
.
pingzi_2Transform
=
this
.
pingzi_2
.
getComponent
(
Transform
);
this
.
gouzi_pingziTransform
=
this
.
gouzi_pingzi
.
getComponent
(
Transform
);
this
.
grabState
=
false
;
this
.
hasPrize
=
false
;
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console
.
log
(
"sd"
)
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
this
.
gouzi_pingziTransform
.
alpha
=
0
this
.
pingzi_2Transform
.
alpha
=
1
createTween
(
this
,
this
.
startBtnAnimation
,
true
,{
loop
:
-
1
})
.
set
({
scale
:
{
x
:
1
,
y
:
1
}})
.
to
({
scale
:
{
x
:
.
9
,
y
:
.
9
}},
300
)
.
wait
(
1000
)
.
to
({
scale
:
{
x
:
1
,
y
:
1
}},
300
)
createTween
(
this
,
this
.
pingziBackTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
47.5
}})
.
to
({
position
:
{
x
:
-
152.5
}},
1000
)
createTween
(
this
,
this
.
pingziFrontTransform
,
true
,{
loop
:
-
1
})
.
set
({
position
:
{
x
:
-
110
}})
.
to
({
position
:
{
x
:
110
}},
1000
)
.
call
(()
=>
{
//console.log(`2`)
if
(
this
.
grabState
){
this
.
grabState
=
false
;
var
time
=
1000
;
if
(
this
.
hasPrize
){
time
=
1000
;
}
else
{
time
=
500
;
}
createTween
(
this
,
this
.
gouziTransform
,
true
,{
loop
:
0
})
.
set
({
position
:
{
y
:
132.5
}})
.
to
({
position
:
{
y
:
335
}},
time
)
.
call
(()
=>
{
if
(
this
.
hasPrize
){
this
.
hasPrize
=
false
;
this
.
pingzi_2Transform
.
alpha
=
0
this
.
gouzi_pingziTransform
.
alpha
=
1
setTimeout
(()
=>
{
this
.
pingzi_2Transform
.
alpha
=
1
},
1000
)
}
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
this
.
hasGraDo
()
this
.
pingzi_2Transform
.
alpha
=
1
this
.
gouzi_pingziTransform
.
alpha
=
0
})
}
})
//console.log(sd)
//.call(resolve);
}
private
setCountText
(
text
:
string
)
{
setText
(
this
.
countTxt
,
text
);
}
initGameStage
()
{
this
.
updateCountText
();
}
updateCountText
()
{
const
{
element
}
=
this
.
ajaxElement
;
let
text
=
''
if
(
element
.
freeLimit
>
0
)
{
text
=
`今日剩余免费次数:
${
element
.
freeLimit
}
次`
;
}
else
{
text
=
`
${
element
.
needCredits
}${
window
[
'CFG'
].
unitName
}
/次`
}
this
.
setCountText
(
text
);
}
grabState
=
false
;
hasPrize
=
false
;
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
}
}
else
{
this
.
hasPrize
=
false
;
}
}
hasGraDo
(){
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
else
{
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
},
(
key
:
string
,
messageObj
:
any
)
=>
{
this
.
onGotDojoinError
();
});
}
else
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
activityId
:
window
[
'CFG'
].
actId
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
});
}
}
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
this
.
doJoin
});
}
onGotDojoinError
(
data
?)
{
console
.
log
(
'onGotDojoinError'
)
console
.
log
(
this
.
doJoin
)
console
.
log
(
data
)
}
onGot_getNgameStartStatus
()
{
//console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
}
onGotError_getNgameStartStatus
()
{
//console.log(this.getNgameStartStatus)
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
onClick_rulebtn
()
{
console
.
log
(
'onClick_rulebtn'
);
this
.
bubbling
(
'showDialog'
,
'Rule'
);
}
onClick_recordbtn
()
{
console
.
log
(
'onClick_rulebtn'
);
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn
()
{
alert
(
'onClick_rankbtn'
)
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
true
;
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
this
.
entity
.
enabled
=
false
;
}
async
onWillEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
async
onWillLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
)
{
}
onWillMount
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
onWillUnMount
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
Promise
<
any
>
{
return
undefined
;
}
}
.history/mock/hdtool/recon/doJoin_20190622112448.json
0 → 100644
View file @
db038a85
{
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1548915321930
,
"data"
:
123456
}
.history/mock/hdtool/recon/getOrderStatus_20190622114533.json
0 → 100644
View file @
db038a85
{
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1548923950498
,
"data"
:
{
"element"
:
{
"success"
:
false
,
"isCreditsTypeOpen"
:
false
,
"needCredits"
:
"100"
,
"myCredits"
:
"999999630434"
,
"myCreditsLong"
:
999999630434
,
"needCreditsLong"
:
100
,
"freeLimit"
:
-1
,
"status"
:
2
,
"freeEmpty"
:
true
},
"lottery"
:
null
,
"exposure"
:
{
"dcm"
:
"202.3233.0.0"
,
"dpm"
:
"1212.110.1.1"
},
"creditsInfo"
:
{
"activityId"
:
82567
,
"prizeId"
:
4
,
"orderNum"
:
null
,
"developerBizId"
:
"3029576"
,
"score"
:
null
,
"recordStatus"
:
1
,
"errorMsg"
:
null
},
"againTag"
:
null
}
}
\ No newline at end of file
.history/mock/hdtool/recon/getOrderStatus_20190622114629.json
0 → 100644
View file @
db038a85
{
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1548923950498
,
"data"
:
{
"element"
:
{
"success"
:
false
,
"isCreditsTypeOpen"
:
false
,
"needCredits"
:
"100"
,
"myCredits"
:
"999999630434"
,
"myCreditsLong"
:
999999630434
,
"needCreditsLong"
:
100
,
"freeLimit"
:
-1
,
"status"
:
2
,
"freeEmpty"
:
true
},
"lottery"
:
{
"id"
:
253071
,
"type"
:
"virtual"
,
"imgUrl"
:
"//yun.duiba.com.cn/images/201806/y7jhibke16.png"
,
"link"
:
"//activity.m.duiba.com.cn/activity/takePrizeNew?recordId=4552894285&dbnewopen"
,
"title"
:
"5搜豆"
,
"itemId"
:
42967
,
"appItemId"
:
null
,
"bonus"
:
null
,
"bonusMin"
:
null
,
"bonusMax"
:
null
,
"needAccount"
:
null
,
"appLucky"
:
null
,
"tip"
:
null
,
"useBtnText"
:
null
,
"validate"
:
null
,
"couponCode"
:
null
,
"couponKey"
:
null
,
"stInfoDpmImg"
:
null
,
"stInfoDpmClose"
:
null
,
"stInfoDpmGoUse"
:
null
,
"showUse"
:
null
,
"openUrl"
:
null
,
"iosDownloadUrl"
:
null
,
"androidDownloadUrl"
:
null
,
"isDownloadUrl"
:
null
,
"confirm"
:
null
,
"phaseNumber"
:
null
,
"happyCode"
:
null
,
"appHidden"
:
true
,
"zybangJson"
:
null
},
"exposure"
:
{
"dcm"
:
"202.3233.0.0"
,
"dpm"
:
"1212.110.1.1"
},
"creditsInfo"
:
{
"activityId"
:
82567
,
"prizeId"
:
4
,
"orderNum"
:
null
,
"developerBizId"
:
"3029576"
,
"score"
:
null
,
"recordStatus"
:
1
,
"errorMsg"
:
null
},
"againTag"
:
null
}
}
\ No newline at end of file
assets/scenes/main.scene
View file @
db038a85
...
@@ -116,7 +116,59 @@
...
@@ -116,7 +116,59 @@
"gouzi": "entity|14e15843-7bff-474b-857f-c23cf3dae20a",
"gouzi": "entity|14e15843-7bff-474b-857f-c23cf3dae20a",
"pingzi_1": "entity|f8175d37-59a4-46bf-b281-6b9d8c7e8019",
"pingzi_1": "entity|f8175d37-59a4-46bf-b281-6b9d8c7e8019",
"pingzi_2": "entity|e285b74a-1412-4cd6-a305-16378a030922",
"pingzi_2": "entity|e285b74a-1412-4cd6-a305-16378a030922",
"gouzi_pingzi": "entity|baba7316-9d74-44c1-b2a8-1852e716e67d"
"gouzi_pingzi": "entity|baba7316-9d74-44c1-b2a8-1852e716e67d",
"doJoinData": "dynamic|API|doJoinData",
"getOrderStatus": "dynamic|API|getOrderStatus"
}
},
{
"script": "./scripts/api/SamplePollingApi",
"properties": {
"name": "getOrderStatus",
"uri": "/hdtool/recon/getOrderStatus",
"onError": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onError_orderStatus"
}
],
"onFinish": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onFinish_orderStatus"
}
],
"onResponse": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onResponse_orderStatus"
}
]
}
},
{
"script": "./scripts/api/SampleApi",
"properties": {
"name": "doJoin",
"method": "GET",
"onError": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onGotDojoinError"
}
],
"onFinish": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onGotDojoin"
}
],
"uri": "/hdtool/recon/doJoin"
}
}
}
}
],
],
...
...
assets/scripts/scenes/SceneStart.ts
View file @
db038a85
...
@@ -13,7 +13,7 @@ import {createTween, ease} from "scilla";
...
@@ -13,7 +13,7 @@ import {createTween, ease} from "scilla";
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
ajaxElement
:
dynamic
;
ajaxElement
:
dynamic
;
doJoin
:
dynamic
;
doJoin
:
dynamic
;
get
NgameStart
Status
:
dynamic
;
get
Order
Status
:
dynamic
;
countTxt
:
Entity
;
countTxt
:
Entity
;
startbtn
:
Entity
;
startbtn
:
Entity
;
...
@@ -108,8 +108,9 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
...
@@ -108,8 +108,9 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
})
})
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
to
({
position
:
{
y
:
132.5
}},
1000
)
.
call
(()
=>
{
.
call
(()
=>
{
this
.
hasGraDo
()
this
.
pingzi_2Transform
.
alpha
=
1
this
.
pingzi_2Transform
.
alpha
=
1
//
this.gouzi_pingziTransform.alpha=0
this
.
gouzi_pingziTransform
.
alpha
=
0
})
})
}
}
...
@@ -146,10 +147,56 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
...
@@ -146,10 +147,56 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
grabState
=
false
;
grabState
=
false
;
hasPrize
=
false
;
hasPrize
=
false
;
onClick_startbtn
()
{
onFinish_orderStatus
(){
if
(
!
this
.
getOrderStatus
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
}
onResponse_orderStatus
()
{
//this.bubbling('showDialog', 'GameOver');
console
.
log
(
1
)
console
.
log
(
this
.
getOrderStatus
)
this
.
grabState
=
true
;
this
.
grabState
=
true
;
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
hasPrize
=
false
;
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
hasPrize
=
false
;
}
else
{
this
.
hasPrize
=
true
;
this
.
hasPrize
=
true
;
/* if (window['getDuibaToken']) {
}
}
else
{
this
.
hasPrize
=
false
;
}
}
hasGraDo
(){
if
(
this
.
getOrderStatus
.
code
==
"C000000001"
){
this
.
bubbling
(
'showDialog'
,
'Alert'
,
"查询超时,请点击首页【奖品】按钮查看。"
);
}
else
if
(
this
.
getOrderStatus
.
lottery
){
if
(
this
.
getOrderStatus
.
lottery
.
type
==
"thanks"
){
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
else
{
this
.
bubbling
(
'showDialog'
,
'GameOver'
,
this
.
getOrderStatus
);
}
}
else
{
this
.
bubbling
(
'showDialog'
,
'GameNoPrize'
);
}
}
onError_orderStatus
()
{
console
.
log
(
2
)
}
onClick_startbtn
()
{
/* this.grabState=true;
this.hasPrize=true; */
if
(
window
[
'getDuibaToken'
])
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
window
[
'getDuibaToken'
]((
tokenObj
:
any
)
=>
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
this
.
broadcast
(
'callApi'
,
1
,
'doJoin'
,
{
token
:
tokenObj
.
token
,
token
:
tokenObj
.
token
,
...
@@ -166,12 +213,12 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
...
@@ -166,12 +213,12 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
activityType
:
'hdtool'
,
activityType
:
'hdtool'
,
consumerId
:
window
[
'CFG'
].
consumerId
consumerId
:
window
[
'CFG'
].
consumerId
});
});
} */
}
}
}
onGotDojoin
()
{
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
broadcast
(
'callApi'
,
1
,
'get
NgameStart
Status'
,
{
this
.
broadcast
(
'callApi'
,
1
,
'get
Order
Status'
,
{
orderId
:
this
.
doJoin
orderId
:
this
.
doJoin
});
});
}
}
...
@@ -183,13 +230,13 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
...
@@ -183,13 +230,13 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
}
onGot_getNgameStartStatus
()
{
onGot_getNgameStartStatus
()
{
console
.
log
(
'onGot_getNgameStartStatus'
,
this
.
getNgameStartStatus
);
//
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
//fuck 不可以循环引用
this
.
bubbling
(
'fuck'
,
'play'
);
this
.
bubbling
(
'fuck'
,
'play'
);
}
}
onGotError_getNgameStartStatus
()
{
onGotError_getNgameStartStatus
()
{
console
.
log
(
this
.
getNgameStartStatus
)
//
console.log(this.getNgameStartStatus)
console
.
log
(
'onGotError_getNgameStartStatus'
);
console
.
log
(
'onGotError_getNgameStartStatus'
);
}
}
...
...
mock/hdtool/recon/doJoin.json
View file @
db038a85
{
"success"
:
fals
e
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1548915321930
,
"data"
:
123456
}
{
"success"
:
tru
e
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1548915321930
,
"data"
:
123456
}
src/generated/MustCompile.ts
View file @
db038a85
...
@@ -5,65 +5,65 @@
...
@@ -5,65 +5,65 @@
import
{
registerDef
}
from
'scilla'
import
{
registerDef
}
from
'scilla'
import
component0
from
'components/
base/Transform
'
;
import
component0
from
'components/
renderer/TextRenderer
'
;
registerDef
(
'components/
base/Transform
'
,
component0
);
registerDef
(
'components/
renderer/TextRenderer
'
,
component0
);
import
component1
from
'components/
other/FullStageSize
'
;
import
component1
from
'components/
base/Transform
'
;
registerDef
(
'components/
other/FullStageSize
'
,
component1
);
registerDef
(
'components/
base/Transform
'
,
component1
);
import
component2
from
'components/renderer/
Texture
Renderer'
;
import
component2
from
'components/renderer/
Html
Renderer'
;
registerDef
(
'components/renderer/
Texture
Renderer'
,
component2
);
registerDef
(
'components/renderer/
Html
Renderer'
,
component2
);
import
component3
from
'components/
renderer/RectRenderer
'
;
import
component3
from
'components/
base/TouchInterrupt
'
;
registerDef
(
'components/
renderer/RectRenderer
'
,
component3
);
registerDef
(
'components/
base/TouchInterrupt
'
,
component3
);
import
component4
from
'components/
animation/TouchZoom
'
;
import
component4
from
'components/
other/FullStageSize
'
;
registerDef
(
'components/
animation/TouchZoom
'
,
component4
);
registerDef
(
'components/
other/FullStageSize
'
,
component4
);
import
component5
from
'components/
ui/Button
'
;
import
component5
from
'components/
other/CameraController
'
;
registerDef
(
'components/
ui/Button
'
,
component5
);
registerDef
(
'components/
other/CameraController
'
,
component5
);
import
component6
from
'components/
renderer/TextRenderer
'
;
import
component6
from
'components/
ui/Button
'
;
registerDef
(
'components/
renderer/TextRenderer
'
,
component6
);
registerDef
(
'components/
ui/Button
'
,
component6
);
import
component7
from
'components/
other/CameraController
'
;
import
component7
from
'components/
animation/TouchZoom
'
;
registerDef
(
'components/
other/CameraController
'
,
component7
);
registerDef
(
'components/
animation/TouchZoom
'
,
component7
);
import
component8
from
'components/
base/TouchInterrupt
'
;
import
component8
from
'components/
renderer/RectRenderer
'
;
registerDef
(
'components/
base/TouchInterrupt
'
,
component8
);
registerDef
(
'components/
renderer/RectRenderer
'
,
component8
);
import
component9
from
'components/renderer/
Html
Renderer'
;
import
component9
from
'components/renderer/
Texture
Renderer'
;
registerDef
(
'components/renderer/
Html
Renderer'
,
component9
);
registerDef
(
'components/renderer/
Texture
Renderer'
,
component9
);
import
component10
from
'../../assets/scripts/
game/CustomTextRenderer
'
;
import
component10
from
'../../assets/scripts/
dialogs/RuleDialogContent
'
;
registerDef
(
'./scripts/
game/CustomTextRenderer
'
,
component10
);
registerDef
(
'./scripts/
dialogs/RuleDialogContent
'
,
component10
);
import
component11
from
'../../assets/scripts/
navigator/SingleSceneNavigator
'
;
import
component11
from
'../../assets/scripts/
api/SamplePollingApi
'
;
registerDef
(
'./scripts/
navigator/SingleSceneNavigator
'
,
component11
);
registerDef
(
'./scripts/
api/SamplePollingApi
'
,
component11
);
import
component12
from
'../../assets/scripts/scenes/SceneController'
;
import
component12
from
'../../assets/scripts/scenes/SceneController'
;
registerDef
(
'./scripts/scenes/SceneController'
,
component12
);
registerDef
(
'./scripts/scenes/SceneController'
,
component12
);
import
component13
from
'../../assets/scripts/
scenes/SceneStart
'
;
import
component13
from
'../../assets/scripts/
navigator/SingleSceneNavigator
'
;
registerDef
(
'./scripts/
scenes/SceneStart
'
,
component13
);
registerDef
(
'./scripts/
navigator/SingleSceneNavigator
'
,
component13
);
import
component14
from
'../../assets/scripts/
api/SamplePollingApi
'
;
import
component14
from
'../../assets/scripts/
scenes/ScenePlay
'
;
registerDef
(
'./scripts/
api/SamplePollingApi
'
,
component14
);
registerDef
(
'./scripts/
scenes/ScenePlay
'
,
component14
);
import
component15
from
'../../assets/scripts/popup/Popup'
;
import
component15
from
'../../assets/scripts/popup/Popup'
;
registerDef
(
'./scripts/popup/Popup'
,
component15
);
registerDef
(
'./scripts/popup/Popup'
,
component15
);
import
component16
from
'../../assets/scripts/
MainController
'
;
import
component16
from
'../../assets/scripts/
api/SampleApi
'
;
registerDef
(
'./scripts/
MainController
'
,
component16
);
registerDef
(
'./scripts/
api/SampleApi
'
,
component16
);
import
component17
from
'../../assets/scripts/dialogs/AlertDialogContent'
;
import
component17
from
'../../assets/scripts/dialogs/AlertDialogContent'
;
registerDef
(
'./scripts/dialogs/AlertDialogContent'
,
component17
);
registerDef
(
'./scripts/dialogs/AlertDialogContent'
,
component17
);
import
component18
from
'../../assets/scripts/
dialogs/RuleDialogConten
t'
;
import
component18
from
'../../assets/scripts/
scenes/SceneStar
t'
;
registerDef
(
'./scripts/
dialogs/RuleDialogConten
t'
,
component18
);
registerDef
(
'./scripts/
scenes/SceneStar
t'
,
component18
);
import
component19
from
'../../assets/scripts/
api/SampleApi
'
;
import
component19
from
'../../assets/scripts/
MainController
'
;
registerDef
(
'./scripts/
api/SampleApi
'
,
component19
);
registerDef
(
'./scripts/
MainController
'
,
component19
);
import
component20
from
'../../assets/scripts/dialogs/GameOverPanel'
;
import
component20
from
'../../assets/scripts/dialogs/GameOverPanel'
;
registerDef
(
'./scripts/dialogs/GameOverPanel'
,
component20
);
registerDef
(
'./scripts/dialogs/GameOverPanel'
,
component20
);
...
@@ -80,5 +80,5 @@ registerDef('./scripts/dialogs/GameNoPrizePanel', component23);
...
@@ -80,5 +80,5 @@ registerDef('./scripts/dialogs/GameNoPrizePanel', component23);
import
component24
from
'../../assets/scripts/common/Toast'
;
import
component24
from
'../../assets/scripts/common/Toast'
;
registerDef
(
'./scripts/common/Toast'
,
component24
);
registerDef
(
'./scripts/common/Toast'
,
component24
);
import
component25
from
'../../assets/scripts/
scenes/ScenePlay
'
;
import
component25
from
'../../assets/scripts/
game/CustomTextRenderer
'
;
registerDef
(
'./scripts/
scenes/ScenePlay
'
,
component25
);
registerDef
(
'./scripts/
game/CustomTextRenderer
'
,
component25
);
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