Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shuijf
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
shuijf
Commits
ee3a7c81
Commit
ee3a7c81
authored
Jun 19, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
adbb899c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
163 additions
and
25 deletions
+163
-25
main.scene
assets/scenes/main.scene
+25
-0
PrizeDialogContent.ts
assets/scripts/dialogs/PrizeDialogContent.ts
+45
-0
PrizeDialogContent.ts.meta
assets/scripts/dialogs/PrizeDialogContent.ts.meta
+1
-0
SceneStart.ts
assets/scripts/scenes/SceneStart.ts
+10
-8
test.png
assets/singles/test.png
+0
-0
test.png.meta
assets/singles/test.png.meta
+1
-0
getOrderStatus.json
mock/hdtool/recon/getOrderStatus.json
+62
-1
getNgameStartStatus.json
mock/hdtool/recon/ngame/getNgameStartStatus.json
+2
-2
MustCompile.ts
src/generated/MustCompile.ts
+17
-14
No files found.
assets/scenes/main.scene
View file @
ee3a7c81
...
@@ -1168,6 +1168,12 @@
...
@@ -1168,6 +1168,12 @@
"y": -310
"y": -310
}
}
}
}
},
{
"script": "./scripts/dialogs/PrizeDialogContent",
"properties": {
"pic": "entity|5e468650-9e44-4f2d-8dba-be066cd89c37"
}
}
}
],
],
"uuid": "48d00d27-5587-4a24-b5ba-f8a11a714e39",
"uuid": "48d00d27-5587-4a24-b5ba-f8a11a714e39",
...
@@ -1261,6 +1267,25 @@
...
@@ -1261,6 +1267,25 @@
],
],
"children": [],
"children": [],
"uuid": "4a171b87-ea4d-41c2-9009-31eb1bf19383"
"uuid": "4a171b87-ea4d-41c2-9009-31eb1bf19383"
},
{
"name": "pic",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0,
"y": 30
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {}
}
],
"uuid": "5e468650-9e44-4f2d-8dba-be066cd89c37"
}
}
],
],
"disabled": false
"disabled": false
...
...
assets/scripts/dialogs/PrizeDialogContent.ts
0 → 100644
View file @
ee3a7c81
/**
* Created by rockyl on 2019-04-10.
*
* 警告对话框内容
*/
import
{
TextureRenderer
}
from
"scilla-components/src"
;
import
{
EngineConfig
,
Entity
,
AssetsManager
,
Texture
,
createTexture
}
from
"scilla/src"
;
import
DialogContent
from
"../popup/DialogContent"
;
export
default
class
PrizeDialogContent
extends
DialogContent
{
private
loadImage
=
(
url
:
string
):
Promise
<
HTMLImageElement
>
=>
{
return
new
Promise
<
HTMLImageElement
>
((
resolve
,
reject
)
=>
{
let
img
=
new
Image
();
if
(
EngineConfig
.
imgCrossOrigin
)
{
img
.
setAttribute
(
'crossOrigin'
,
'anonymous'
);
}
img
.
onload
=
function
(
e
)
{
resolve
(
img
);
};
img
.
onerror
=
function
(
e
)
{
reject
(
e
);
};
img
.
src
=
url
;
});
}
private
loadTexture
=
async
(
url
:
string
):
Promise
<
Texture
>
=>
{
const
img
=
await
this
.
loadImage
(
url
);
const
texture
=
createTexture
(
img
);
return
texture
;
}
pic
:
Entity
;
onAwake
()
{
super
.
onAwake
();
AssetsManager
}
async
setup
(
data
:
any
=
{})
{
const
texRender
=
this
.
pic
.
getComponent
(
TextureRenderer
);
const
texture
=
await
this
.
loadTexture
(
'//yun1.duiba.com.cn/upload/uP99F1462438316972.png'
);
texRender
.
texture
=
texture
;
}
}
assets/scripts/dialogs/PrizeDialogContent.ts.meta
0 → 100644
View file @
ee3a7c81
{"ver":"1.0.1","uuid":"3321fa44-dadf-4d67-8e26-04ba5fb8bac7","subMetas":{},"type":"script"}
assets/scripts/scenes/SceneStart.ts
View file @
ee3a7c81
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*/
*/
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
ScillaComponent
from
"scilla-components/src/base/ScillaComponent"
;
import
{
dynamic
,
Entity
}
from
"scilla/src"
;
import
{
dynamic
,
Entity
,
AssetsManager
}
from
"scilla/src"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
setText
}
from
"../entityUtils"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
...
@@ -29,9 +29,9 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
...
@@ -29,9 +29,9 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
console
.
log
(
'fuck start scene'
)
console
.
log
(
'fuck start scene'
)
this
.
_gifts
=
this
.
treeWrapper
.
getChildrenByName
(
'gift'
);
this
.
_gifts
=
this
.
treeWrapper
.
getChildrenByName
(
'gift'
);
//
setTimeout(() => {
setTimeout
(()
=>
{
// this.bubbling('showDialog', 'Alert
','fuck');
this
.
bubbling
(
'showDialog'
,
'Prize
'
,
'fuck'
);
//
}, 1000);
},
1000
);
}
}
private
setCountText
(
text
:
string
)
{
private
setCountText
(
text
:
string
)
{
...
@@ -90,7 +90,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
...
@@ -90,7 +90,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
}
}
}
onGotDojoin
()
{
onGotDojoin
(
error
)
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
// this.startbtn.getComponent(Button).enabled = true;
// this.startbtn.getComponent(Button).enabled = true;
this
.
broadcast
(
'callApi'
,
1
,
'getNgameStartStatus'
,
{
this
.
broadcast
(
'callApi'
,
1
,
'getNgameStartStatus'
,
{
...
@@ -100,17 +100,19 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
...
@@ -100,17 +100,19 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
onGotDojoinError
(...
argument
)
{
onGotDojoinError
(...
argument
)
{
this
.
startbtn
.
getComponent
(
Button
).
enabled
=
true
;
this
.
startbtn
.
getComponent
(
Button
).
enabled
=
true
;
console
.
log
(
'onGotDojoinError'
,
argument
);
console
.
log
(
'onGotDojoinError'
,
argument
);
}
}
onGot_getNgameStartStatus
()
{
onGot_getNgameStartStatus
()
{
this
.
startbtn
.
getComponent
(
Button
).
enabled
=
true
;
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
(...
argument
)
{
console
.
log
(
'onGotError_getNgameStartStatus'
);
this
.
startbtn
.
getComponent
(
Button
).
enabled
=
true
;
console
.
log
(
'onGotError_getNgameStartStatus'
,
argument
);
}
}
onClick_rulebtn
()
{
onClick_rulebtn
()
{
...
...
assets/singles/test.png
0 → 100644
View file @
ee3a7c81
12.5 KB
assets/singles/test.png.meta
0 → 100644
View file @
ee3a7c81
{"ver":"1.0.1","uuid":"f851b613-f1a9-48b0-83f1-be7fdc46a671","subMetas":{"test":{"ver":"1.0.1","uuid":"6eb9850d-5a36-4792-b544-a40cf2ed00d2","rawTextureUuid":"f851b613-f1a9-48b0-83f1-be7fdc46a671","type":"texture"}},"type":"texture","imagePath":"/Users/wanghongyuan/shuijf/assets/singles/test.png"}
mock/hdtool/recon/getOrderStatus.json
View file @
ee3a7c81
{
"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"
:
1
,
"freeEmpty"
:
true
},
"lottery"
:{
"id"
:
null
,
"type"
:
"thanks"
,
"imgUrl"
:
null
,
"link"
:
null
,
"title"
:
null
,
"itemId"
:
null
,
"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"
:
null
,
"creditsInfo"
:{
"activityId"
:
82567
,
"prizeId"
:
4
,
"orderNum"
:
null
,
"developerBizId"
:
"3029576"
,
"score"
:
null
,
"recordStatus"
:
1
,
"errorMsg"
:
null
},
"againTag"
:
null
}}
{
"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"
:
1
,
"freeEmpty"
:
true
},
"lottery"
:
{
"id"
:
null
,
"type"
:
"thanks"
,
"imgUrl"
:
null
,
"link"
:
null
,
"title"
:
null
,
"itemId"
:
null
,
"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"
:
null
,
"creditsInfo"
:
{
"activityId"
:
82567
,
"prizeId"
:
4
,
"orderNum"
:
null
,
"developerBizId"
:
"3029576"
,
"score"
:
null
,
"recordStatus"
:
1
,
"errorMsg"
:
null
},
"againTag"
:
null
}
}
\ No newline at end of file
mock/hdtool/recon/ngame/getNgameStartStatus.json
View file @
ee3a7c81
{
{
"success"
:
tru
e
,
"success"
:
fals
e
,
"code"
:
"
0000000000
"
,
"code"
:
"
C000000001
"
,
"desc"
:
"OK"
,
"desc"
:
"OK"
,
"timestamp"
:
1550570639368
,
"timestamp"
:
1550570639368
,
"data"
:
{
"data"
:
{
...
...
src/generated/MustCompile.ts
View file @
ee3a7c81
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
import
{
registerDef
}
from
'scilla'
import
{
registerDef
}
from
'scilla'
import
component0
from
'components/
ui/ScrollView
'
;
import
component0
from
'components/
other/RelativeLayout
'
;
registerDef
(
'components/
ui/ScrollView
'
,
component0
);
registerDef
(
'components/
other/RelativeLayout
'
,
component0
);
import
component1
from
'components/base/Transform'
;
import
component1
from
'components/base/Transform'
;
registerDef
(
'components/base/Transform'
,
component1
);
registerDef
(
'components/base/Transform'
,
component1
);
...
@@ -29,8 +29,8 @@ registerDef('components/other/FullStageSize', component6);
...
@@ -29,8 +29,8 @@ registerDef('components/other/FullStageSize', component6);
import
component7
from
'components/renderer/TextRenderer'
;
import
component7
from
'components/renderer/TextRenderer'
;
registerDef
(
'components/renderer/TextRenderer'
,
component7
);
registerDef
(
'components/renderer/TextRenderer'
,
component7
);
import
component8
from
'components/other/
RelativeLayout
'
;
import
component8
from
'components/other/
CameraController
'
;
registerDef
(
'components/other/
RelativeLayout
'
,
component8
);
registerDef
(
'components/other/
CameraController
'
,
component8
);
import
component9
from
'components/renderer/TextureRenderer'
;
import
component9
from
'components/renderer/TextureRenderer'
;
registerDef
(
'components/renderer/TextureRenderer'
,
component9
);
registerDef
(
'components/renderer/TextureRenderer'
,
component9
);
...
@@ -38,11 +38,11 @@ registerDef('components/renderer/TextureRenderer', component9);
...
@@ -38,11 +38,11 @@ registerDef('components/renderer/TextureRenderer', component9);
import
component10
from
'components/renderer/RectRenderer'
;
import
component10
from
'components/renderer/RectRenderer'
;
registerDef
(
'components/renderer/RectRenderer'
,
component10
);
registerDef
(
'components/renderer/RectRenderer'
,
component10
);
import
component11
from
'components/
other/CameraController
'
;
import
component11
from
'components/
ui/ScrollView
'
;
registerDef
(
'components/
other/CameraController
'
,
component11
);
registerDef
(
'components/
ui/ScrollView
'
,
component11
);
import
component12
from
'../../assets/scripts/
api/SampleApi
'
;
import
component12
from
'../../assets/scripts/
dialogs/RuleDialogContent
'
;
registerDef
(
'./scripts/
api/SampleApi
'
,
component12
);
registerDef
(
'./scripts/
dialogs/RuleDialogContent
'
,
component12
);
import
component13
from
'../../assets/scripts/api/SamplePollingApi'
;
import
component13
from
'../../assets/scripts/api/SamplePollingApi'
;
registerDef
(
'./scripts/api/SamplePollingApi'
,
component13
);
registerDef
(
'./scripts/api/SamplePollingApi'
,
component13
);
...
@@ -56,11 +56,11 @@ registerDef('./scripts/scenes/SceneController', component15);
...
@@ -56,11 +56,11 @@ registerDef('./scripts/scenes/SceneController', component15);
import
component16
from
'../../assets/scripts/popup/Popup'
;
import
component16
from
'../../assets/scripts/popup/Popup'
;
registerDef
(
'./scripts/popup/Popup'
,
component16
);
registerDef
(
'./scripts/popup/Popup'
,
component16
);
import
component17
from
'../../assets/scripts/
scenes/SceneStart
'
;
import
component17
from
'../../assets/scripts/
api/SampleApi
'
;
registerDef
(
'./scripts/
scenes/SceneStart
'
,
component17
);
registerDef
(
'./scripts/
api/SampleApi
'
,
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/game/CustomTextRenderer'
;
import
component19
from
'../../assets/scripts/game/CustomTextRenderer'
;
registerDef
(
'./scripts/game/CustomTextRenderer'
,
component19
);
registerDef
(
'./scripts/game/CustomTextRenderer'
,
component19
);
...
@@ -71,5 +71,8 @@ registerDef('./scripts/MainController', component20);
...
@@ -71,5 +71,8 @@ registerDef('./scripts/MainController', component20);
import
component21
from
'../../assets/scripts/dialogs/AlertDialogContent'
;
import
component21
from
'../../assets/scripts/dialogs/AlertDialogContent'
;
registerDef
(
'./scripts/dialogs/AlertDialogContent'
,
component21
);
registerDef
(
'./scripts/dialogs/AlertDialogContent'
,
component21
);
import
component22
from
'../../assets/scripts/common/Toast'
;
import
component22
from
'../../assets/scripts/dialogs/PrizeDialogContent'
;
registerDef
(
'./scripts/common/Toast'
,
component22
);
registerDef
(
'./scripts/dialogs/PrizeDialogContent'
,
component22
);
import
component23
from
'../../assets/scripts/common/Toast'
;
registerDef
(
'./scripts/common/Toast'
,
component23
);
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