Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PU20
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
PU20
Commits
5579fc40
Commit
5579fc40
authored
May 12, 2021
by
jeff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.提交
parent
0952dbf6
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1157 additions
and
860 deletions
+1157
-860
custom-hot-zone-mini.component.html
.../custom-hot-zone-mini/custom-hot-zone-mini.component.html
+49
-57
custom-hot-zone-mini.component.scss
.../custom-hot-zone-mini/custom-hot-zone-mini.component.scss
+3
-0
custom-hot-zone-mini.component.ts
...on/custom-hot-zone-mini/custom-hot-zone-mini.component.ts
+23
-11
form.component.html
form/src/app/form/form.component.html
+15
-10
form.component.ts
form/src/app/form/form.component.ts
+12
-76
tips.anim
play/assets/scene/anim/tips.anim
+2
-2
hitItem.prefab
play/assets/scene/prefab/hitItem.prefab
+302
-96
hitItem.js
play/assets/scene/scene/hitItem.js
+104
-0
hitItem.js.meta
play/assets/scene/scene/hitItem.js.meta
+9
-0
picNode.js
play/assets/scene/scene/picNode.js
+50
-51
picNode.js.meta
play/assets/scene/scene/picNode.js.meta
+1
-1
scene.fire
play/assets/scene/scene/scene.fire
+533
-499
scene.js
play/assets/scene/scene/scene.js
+7
-47
scene.js.meta
play/assets/scene/scene/scene.js.meta
+0
-0
NewScript.ts
play/assets/scene/script/NewScript.ts
+7
-8
tools.js
play/assets/scene/script/tools.js
+4
-2
bg_quan.png
play/assets/scene/textures/bg_quan.png
+0
-0
bg_quan.png.meta
play/assets/scene/textures/bg_quan.png.meta
+36
-0
No files found.
form/src/app/common/custom-hot-zone-mini/custom-hot-zone-mini.component.html
View file @
5579fc40
<div
class=
"p-image-children-editor"
>
<div
class=
"p-image-children-editor"
>
<h5
style=
"margin-left: 2.5%;"
>
预览:
</h5>
<h5
style=
"margin-left: 2.5%;
margin-top: 10px;
"
>
预览:
</h5>
<div
class=
"preview-box"
#
wrap
>
<div
class=
"preview-box"
#
wrap
>
<canvas
id=
"canvas"
#
canvas
></canvas>
<canvas
id=
"canvas"
#
canvas
></canvas>
...
@@ -12,18 +12,15 @@
...
@@ -12,18 +12,15 @@
<h5>
添加背景:
</h5>
<h5>
添加背景:
</h5>
<div
class=
"bg-box"
>
<div
class=
"bg-box"
>
<app-upload-image-with-preview
<app-upload-image-with-preview
[
picUrl
]="
bgItem
?.
url
"
(
imageUploaded
)="
onBackgroundUploadSuccess
($
event
)"
>
[
picUrl
]="
bgItem
?.
url
"
(
imageUploaded
)="
onBackgroundUploadSuccess
($
event
)"
>
</app-upload-image-with-preview>
</app-upload-image-with-preview>
</div>
</div>
</div>
</div>
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
class=
"img-box"
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
class=
"img-box"
*
ngFor=
"let it of hotZoneArr; let i = index"
>
*
ngFor=
"let it of hotZoneArr; let i = index"
>
<div
<div
style=
"margin: auto; padding: 5px; margin-top: 30px; width:90%; border: 2px dashed #ddd; border-radius: 10px"
>
style=
"margin: auto; padding: 5px;
min-width: 220px;
margin-top: 30px; width:90%; border: 2px dashed #ddd; border-radius: 10px"
>
<span
style=
"margin-left: 40%;"
>
区域{{i + 1}}
<span
style=
"margin-left: 40%;"
>
区域{{i + 1}}
</span>
</span>
<button
style=
"float: right;"
nz-button
nzType=
"danger"
nzSize=
"small"
(
click
)="
deleteBtnClick
(
i
)"
>
<button
style=
"float: right;"
nz-button
nzType=
"danger"
nzSize=
"small"
(
click
)="
deleteBtnClick
(
i
)"
>
...
@@ -34,14 +31,15 @@
...
@@ -34,14 +31,15 @@
<div
style=
"margin-top: -20px; margin-bottom: 5px; width: 100%;"
>
<div
style=
"margin-top: -20px; margin-bottom: 5px; width: 100%;"
>
<!-- <div *ngIf="customTypeGroupArr">
<div
*
ngIf=
"customTypeGroupArr"
>
<nz-radio-group [ngModel]="it.gIdx" (ngModelChange)="customRadioChange($event, it)" style="display: flex; align-items: center; justify-content: center; flex-wrap: wrap;">
<nz-radio-group
[
ngModel
]="
it
.
gIdx
"
(
ngModelChange
)="
customRadioChange
($
event
,
it
)"
style=
"display: flex; align-items: center; justify-content: center; flex-wrap: wrap;"
>
<div
*
ngFor=
"let group of customTypeGroupArr; let gIdx = index"
style=
"display: flex; "
>
<div
*
ngFor=
"let group of customTypeGroupArr; let gIdx = index"
style=
"display: flex; "
>
<label
nz-radio
nzValue=
"{{gIdx}}"
>
{{group.name}}
</label>
<label
nz-radio
nzValue=
"{{gIdx}}"
>
{{group.name}}
</label>
</div>
</div>
</nz-radio-group>
</nz-radio-group>
</div>
-->
</div>
<!-- <div *ngIf="!customTypeGroupArr">
<!-- <div *ngIf="!customTypeGroupArr">
<nz-radio-group [ngModel]="it.itemType" (ngModelChange)="radioChange($event, it)" style="display: flex; align-items: center; justify-content: center">
<nz-radio-group [ngModel]="it.itemType" (ngModelChange)="radioChange($event, it)" style="display: flex; align-items: center; justify-content: center">
...
@@ -58,48 +56,49 @@
...
@@ -58,48 +56,49 @@
<div
*
ngIf=
"customTypeGroupArr && customTypeGroupArr[it.gIdx]"
>
<div
*
ngIf=
"customTypeGroupArr && customTypeGroupArr[it.gIdx]"
>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx].pic"
>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx].pic"
>
<app-upload-image-with-preview
<app-upload-image-with-preview
[
picUrl
]="
it
?.
pic_url
"
(
imageUploaded
)="
onItemImgUploadSuccess
($
event
,
it
)"
>
[
picUrl
]="
it
?.
pic_url
"
(
imageUploaded
)="
onItemImgUploadSuccess
($
event
,
it
)"
>
</app-upload-image-with-preview>
</app-upload-image-with-preview>
</div>
</div>
<div
style=
"margin-top: 5px; margin-bottom: 5px; display: inline-flex;justify-content: space-between;justify-items: center;"
>
<div>
手提示
<nz-switch
[
ngModel
]="
it
.
useHand
"
(
ngModelChange
)="
onChangeSwitch
(
it
,'
useHand
')"
nzCheckedChildren=
"开"
nzUnCheckedChildren=
"关"
></nz-switch>
</div>
<div
*
ngIf=
"it.gIdx==0"
style=
"margin-left: 10px;"
>
显示边框
<nz-switch
[
ngModel
]='
it
.
useBorder
'
(
ngModelChange
)="
onChangeSwitch
(
it
,'
useBorder
')"
nzCheckedChildren=
"开"
nzUnCheckedChildren=
"关"
></nz-switch>
</div>
</div>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx].text"
style=
"margin-top: 5px"
>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx].text"
style=
"margin-top: 5px"
>
<input
type=
"text"
nz-input
[(
ngModel
)]="
it
.
text
"
(
blur
)="
saveText
(
it
)"
>
<input
type=
"text"
nz-input
[(
ngModel
)]="
it
.
text
"
(
blur
)="
saveText
(
it
)"
>
</div>
</div>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx].anima"
align=
"center"
style=
"margin-top: 5px"
>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx].anima"
align=
"center"
style=
"margin-top: 5px"
>
<button
nz-button
(
click
)="
setAnimaBtnClick
(
i
)"
>
<button
nz-button
(
click
)="
setAnimaBtnClick
(
i
)"
>
<i
nz-icon
nzType=
"tool"
nzTheme=
"outline"
></i>
<i
nz-icon
nzType=
"tool"
nzTheme=
"outline"
></i>
配置龙骨动画
配置龙骨动画
</button>
</button>
</div>
</div>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx].animaSmall"
align=
"center"
style=
"margin-top: 5px"
>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx].animaSmall"
align=
"center"
style=
"margin-top: 5px"
>
<button
nz-button
(
click
)="
setAnimaSmallBtnClick
(
i
)"
>
<button
nz-button
(
click
)="
setAnimaSmallBtnClick
(
i
)"
>
<i
nz-icon
nzType=
"tool"
nzTheme=
"outline"
></i>
<i
nz-icon
nzType=
"tool"
nzTheme=
"outline"
></i>
配置龙骨动画(小)
配置龙骨动画(小)
</button>
</button>
</div>
</div>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx].audio"
style=
"display: flex;align-items: center; margin-top: 5px"
>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx].audio"
style=
"display: flex;align-items: center; margin-top: 5px"
>
<app-audio-recorder
<app-audio-recorder
style=
"margin: auto"
[
audioUrl
]="
it
.
audio_url
"
style=
"margin: auto"
(
audioUploaded
)="
onItemAudioUploadSuccess
($
event
,
it
)"
></app-audio-recorder>
[
audioUrl
]="
it
.
audio_url
"
(
audioUploaded
)="
onItemAudioUploadSuccess
($
event
,
it
)"
></app-audio-recorder>
</div>
</div>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx]?.action"
style=
"display: flex;align-items: center; margin-top: 5px"
>
<div
*
ngIf=
"customTypeGroupArr[it.gIdx]?.action"
style=
"display: flex;align-items: center; margin-top: 5px"
>
<app-custom-action
<app-custom-action
style=
"margin: auto"
[
item
]="
it
?
it
['
actionData_
'
+
it
.
gIdx
]
:
{}"
style=
"margin: auto"
[
type
]="
customTypeGroupArr
[
it
.
gIdx
].
action
.
type
"
[
option
]="
customTypeGroupArr
[
it
.
gIdx
].
action
.
option
"
[
item
]="
it
?
it
['
actionData_
'
+
it
.
gIdx
]
:
{}"
[
type
]="
customTypeGroupArr
[
it
.
gIdx
].
action
.
type
"
[
option
]="
customTypeGroupArr
[
it
.
gIdx
].
action
.
option
"
(
save
)="
onSaveCustomAction
($
event
,
it
)"
>
(
save
)="
onSaveCustomAction
($
event
,
it
)"
>
>
</app-custom-action>
>
</app-custom-action>
</div>
</div>
</div>
</div>
...
@@ -145,8 +144,7 @@
...
@@ -145,8 +144,7 @@
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
>
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
>
<div
class=
"bg-box"
>
<div
class=
"bg-box"
>
<button
nz-button
nzType=
"dashed"
(
click
)="
addBtnClick
()"
<button
nz-button
nzType=
"dashed"
(
click
)="
addBtnClick
()"
class=
"add-btn"
>
class=
"add-btn"
>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
<!--Add Image-->
<!--Add Image-->
添加点击区域
添加点击区域
...
@@ -161,22 +159,26 @@
...
@@ -161,22 +159,26 @@
<div
class=
"save-box"
>
<div
class=
"save-box"
>
<button
style=
"margin-left: 200px"
class=
"save-btn"
nz-button
nzType=
"primary"
[
nzSize
]="'
large
'"
nzShape=
"round"
<button
class=
"save-btn"
nz-button
nzType=
"primary"
[
nzSize
]="'
large
'"
nzShape=
"round"
(
click
)="
saveClick
()"
>
(
click
)="
saveClick
()"
>
<i
nz-icon
nzType=
"save"
></i>
<i
nz-icon
nzType=
"save"
></i>
Save
保存
</button>
<button
class=
"save-btn"
nz-button
nzType=
"danger"
[
nzSize
]="'
large
'"
nzShape=
"round"
(
click
)="
deleteClick
()"
>
<i
nz-icon
nzType=
"save"
></i>
删除
</button>
</button>
<div
*
ngIf=
"isCopyData"
style=
"height: 40px; display: flex; justify-items: center;"
>
<div
*
ngIf=
"isCopyData"
style=
"height: 40px; display: flex; justify-items: center;"
>
<label
style=
"margin-left: 40px"
nz-checkbox
[(
ngModel
)]="
bgItem
.
isShowDebugLine
"
>
显示辅助框
</label>
<label
style=
"margin-left: 40px"
nz-checkbox
[(
ngModel
)]="
bgItem
.
isShowDebugLine
"
>
显示辅助框
</label>
<button
style=
"margin-left: 20px; margin-top: -5px"
nz-button
(
click
)="
copyHotZoneData
()"
>
复制基础数据
</button>
<button
style=
"margin-left: 20px; margin-top: -5px"
nz-button
(
click
)="
copyHotZoneData
()"
>
复制基础数据
</button>
<div
style=
"margin-left: 10px; margin-top: -5px"
>
<div
style=
"margin-left: 10px; margin-top: -5px"
>
<span>
粘贴数据:
</span>
<span>
粘贴数据:
</span>
<input
style=
"width: 100px;"
type=
"text"
nz-input
[(
ngModel
)]="
pasteData
"
>
<input
style=
"width: 100px;"
type=
"text"
nz-input
[(
ngModel
)]="
pasteData
"
>
<button
style=
"margin-left: 5px;"
nz-button
[
disabled
]="
pasteData=
=''"
nzType=
"primary"
(
click
)="
importData
()"
>
导入
</button>
<button
style=
"margin-left: 5px;"
nz-button
[
disabled
]="
pasteData=
=''"
nzType=
"primary"
(
click
)="
importData
()"
>
导入
</button>
</div>
</div>
...
@@ -189,20 +191,17 @@
...
@@ -189,20 +191,17 @@
</div>
</div>
<label
style=
"opacity: 0; position: absolute; top: 0px; font-family: 'BRLNSR_1'"
>
1
</label>
<label
style=
"opacity: 0; position: absolute; top: 0px; font-family: 'BRLNSR_1'"
>
1
</label>
<!--龙骨面板-->
<!--龙骨面板-->
<nz-modal
[(
nzVisible
)]="
animaPanelVisible
"
nzTitle=
"配置资源文件"
(
nzAfterClose
)="
closeAfterPanel
()"
(
nzOnCancel
)="
animaPanelCancel
()"
(
nzOnOk
)="
animaPanelOk
()"
nzOkText=
"保存"
>
<nz-modal
[(
nzVisible
)]="
animaPanelVisible
"
nzTitle=
"配置资源文件"
(
nzAfterClose
)="
closeAfterPanel
()"
(
nzOnCancel
)="
animaPanelCancel
()"
(
nzOnOk
)="
animaPanelOk
()"
nzOkText=
"保存"
>
<div
class=
"anima-upload-btn"
>
<div
class=
"anima-upload-btn"
>
<span
style=
"margin-right: 10px"
>
上传 ske_json 文件:
</span>
<span
style=
"margin-right: 10px"
>
上传 ske_json 文件:
</span>
<nz-upload
[
nzShowUploadList
]="
false
"
<nz-upload
[
nzShowUploadList
]="
false
"
nzAccept=
"application/json"
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
nzAccept=
"application/json"
(
nzChange
)="
skeJsonHandleChange
($
event
)"
>
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
(
nzChange
)="
skeJsonHandleChange
($
event
)"
>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i><span>
Upload
</span></button>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i><span>
Upload
</span></button>
</nz-upload>
</nz-upload>
<i
*
ngIf=
"isSkeJsonLoading"
style=
"margin-left: 10px;"
nz-icon
[
nzType
]="'
loading
'"
></i>
<i
*
ngIf=
"isSkeJsonLoading"
style=
"margin-left: 10px;"
nz-icon
[
nzType
]="'
loading
'"
></i>
...
@@ -211,11 +210,8 @@
...
@@ -211,11 +210,8 @@
<div
class=
"anima-upload-btn"
>
<div
class=
"anima-upload-btn"
>
<span
style=
"margin-right: 10px"
>
上传 tex_json 文件:
</span>
<span
style=
"margin-right: 10px"
>
上传 tex_json 文件:
</span>
<nz-upload
[
nzShowUploadList
]="
false
"
<nz-upload
[
nzShowUploadList
]="
false
"
nzAccept=
"application/json"
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
nzAccept=
"application/json"
(
nzChange
)="
texJsonHandleChange
($
event
)"
>
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
(
nzChange
)="
texJsonHandleChange
($
event
)"
>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i><span>
Upload
</span></button>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i><span>
Upload
</span></button>
</nz-upload>
</nz-upload>
<i
*
ngIf=
"isTexJsonLoading"
style=
"margin-left: 10px;"
nz-icon
[
nzType
]="'
loading
'"
></i>
<i
*
ngIf=
"isTexJsonLoading"
style=
"margin-left: 10px;"
nz-icon
[
nzType
]="'
loading
'"
></i>
...
@@ -224,21 +220,17 @@
...
@@ -224,21 +220,17 @@
<div
class=
"anima-upload-btn"
>
<div
class=
"anima-upload-btn"
>
<span
style=
"margin-right: 10px"
>
上传 tex_png 文件:
</span>
<span
style=
"margin-right: 10px"
>
上传 tex_png 文件:
</span>
<nz-upload
[
nzShowUploadList
]="
false
"
<nz-upload
[
nzShowUploadList
]="
false
"
nzAccept=
"image/*"
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
nzAccept =
"image/*"
(
nzChange
)="
texPngHandleChange
($
event
)"
>
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
(
nzChange
)="
texPngHandleChange
($
event
)"
>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i><span>
Upload
</span></button>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i><span>
Upload
</span></button>
</nz-upload>
</nz-upload>
<i
*
ngIf=
"isTexPngLoading"
style=
"margin-left: 10px;"
nz-icon
[
nzType
]="'
loading
'"
></i>
<i
*
ngIf=
"isTexPngLoading"
style=
"margin-left: 10px;"
nz-icon
[
nzType
]="'
loading
'"
></i>
<span
*
ngIf=
"texPngData['name']"
style=
"margin-left: 10px"
><u>
{{texPngData['name']}}
</u></span>
<span
*
ngIf=
"texPngData['name']"
style=
"margin-left: 10px"
><u>
{{texPngData['name']}}
</u></span>
</div>
</div>
<div
class=
"anima-upload-btn"
*
ngIf=
"customTypeGroupArr && customTypeGroupArr[curDragonBoneGIdx] && customTypeGroupArr[curDragonBoneGIdx].animaNames"
>
<div
class=
"anima-upload-btn"
*
ngIf=
"customTypeGroupArr && customTypeGroupArr[curDragonBoneGIdx] && customTypeGroupArr[curDragonBoneGIdx].animaNames"
>
提示:需包含以下动画: {{customTypeGroupArr[curDragonBoneGIdx].animaNames.toString()}}
提示:需包含以下动画: {{customTypeGroupArr[curDragonBoneGIdx].animaNames.toString()}}
</div>
</div>
</nz-modal>
</nz-modal>
\ No newline at end of file
form/src/app/common/custom-hot-zone-mini/custom-hot-zone-mini.component.scss
View file @
5579fc40
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
justify-items
:
center
;
.save-btn
{
.save-btn
{
width
:
160px
;
width
:
160px
;
...
@@ -78,6 +79,8 @@
...
@@ -78,6 +79,8 @@
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
margin-left
:
50px
;
margin-right
:
50px
;
}
}
}
}
...
...
form/src/app/common/custom-hot-zone-mini/custom-hot-zone-mini.component.ts
View file @
5579fc40
...
@@ -66,6 +66,8 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
...
@@ -66,6 +66,8 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
@
Output
()
@
Output
()
save
=
new
EventEmitter
();
save
=
new
EventEmitter
();
@
Output
()
del
=
new
EventEmitter
();
saveDisabled
=
true
;
saveDisabled
=
true
;
...
@@ -268,7 +270,7 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
...
@@ -268,7 +270,7 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
this
.
hotZoneArr
[
i
].
index
=
i
;
this
.
hotZoneArr
[
i
].
index
=
i
;
if
(
this
.
hotZoneArr
[
i
])
{
if
(
this
.
hotZoneArr
[
i
])
{
this
.
hotZoneArr
[
i
].
title
=
'
item-
'
+
(
i
+
1
);
this
.
hotZoneArr
[
i
].
title
=
'
区域
'
+
(
i
+
1
);
}
}
}
}
...
@@ -302,11 +304,12 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
...
@@ -302,11 +304,12 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
item
.
y
=
this
.
canvasHeight
/
2
;
item
.
y
=
this
.
canvasHeight
/
2
;
item
.
itemType
=
this
.
getDefaultItemType
();
item
.
itemType
=
this
.
getDefaultItemType
();
item
.
gIdx
=
this
.
_dafaultIndex
+
''
item
.
gIdx
=
0
item
[
'
id
'
]
=
new
Date
().
getTime
().
toString
();
item
[
'
id
'
]
=
new
Date
().
getTime
().
toString
();
item
[
'
data
'
]
=
saveData
;
item
[
'
data
'
]
=
saveData
;
item
[
'
useHand
'
]
=
true
item
[
'
useBorder
'
]
=
true
console
.
log
(
'
item.x:
'
,
item
.
x
);
console
.
log
(
'
item.x:
'
,
item
.
x
);
if
(
saveData
)
{
if
(
saveData
)
{
...
@@ -320,6 +323,7 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
...
@@ -320,6 +323,7 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
item
[
'
id
'
]
=
saveData
.
id
;
item
[
'
id
'
]
=
saveData
.
id
;
item
[
'
pic
'
]
=
saveData
.
pic_url
item
[
'
pic
'
]
=
saveData
.
pic_url
// item['skeJsonData'] = saveData.skeJsonData;
// item['skeJsonData'] = saveData.skeJsonData;
// item['texJsonData'] = saveData.texJsonData;
// item['texJsonData'] = saveData.texJsonData;
// item['texPngData'] = saveData.texPngData;
// item['texPngData'] = saveData.texPngData;
...
@@ -438,10 +442,9 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
...
@@ -438,10 +442,9 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
}
}
}
}
private
_dafaultIndex
:
number
=
1
getDefaultItemType
()
{
getDefaultItemType
()
{
if
(
this
.
customTypeGroupArr
)
{
if
(
this
.
customTypeGroupArr
)
{
const
group
=
this
.
customTypeGroupArr
[
this
.
_dafaultIndex
];
const
group
=
this
.
customTypeGroupArr
[
0
];
if
(
group
.
rect
)
{
if
(
group
.
rect
)
{
return
'
rect
'
;
return
'
rect
'
;
}
}
...
@@ -1074,13 +1077,20 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
...
@@ -1074,13 +1077,20 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
return
false
;
return
false
;
}
}
saveClick
()
{
saveClick
()
{
const
sendData
=
this
.
getSendData
();
const
sendData
=
this
.
getSendData
();
this
.
save
.
emit
(
sendData
);
this
.
save
.
emit
(
sendData
);
}
}
deleteClick
()
{
this
.
del
.
emit
()
}
/** 改变内容 */
onChangeSwitch
(
data
,
name
:
string
){
data
[
name
]
=!
data
[
name
]
}
getSendData
()
{
getSendData
()
{
const
bgItem
=
this
.
bgItem
;
const
bgItem
=
this
.
bgItem
;
...
@@ -1115,10 +1125,12 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
...
@@ -1115,10 +1125,12 @@ export class CustomHotZoneComponent1 implements OnInit, OnDestroy, OnChanges {
fontScale
:
hotZoneArr
[
i
].
textLabel
?
hotZoneArr
[
i
].
textLabel
.
scaleX
:
1
,
fontScale
:
hotZoneArr
[
i
].
textLabel
?
hotZoneArr
[
i
].
textLabel
.
scaleX
:
1
,
imgScale
:
hotZoneArr
[
i
].
pic
?
hotZoneArr
[
i
].
pic
.
scaleX
:
1
,
imgScale
:
hotZoneArr
[
i
].
pic
?
hotZoneArr
[
i
].
pic
.
scaleX
:
1
,
mapScale
:
this
.
mapScale
,
mapScale
:
this
.
mapScale
,
skeJsonData
:
hotZoneArr
[
i
].
skeJsonData
,
// skeJsonData: hotZoneArr[i].skeJsonData,
texJsonData
:
hotZoneArr
[
i
].
texJsonData
,
// texJsonData: hotZoneArr[i].texJsonData,
texPngData
:
hotZoneArr
[
i
].
texPngData
,
// texPngData: hotZoneArr[i].texPngData,
gIdx
:
hotZoneArr
[
i
].
gIdx
gIdx
:
hotZoneArr
[
i
].
gIdx
,
useHand
:
hotZoneArr
[
i
].
useHand
,
useBorder
:
hotZoneArr
[
i
].
useBorder
};
};
hotZoneItem
[
'
actionData_
'
+
hotZoneItem
.
gIdx
]
=
hotZoneArr
[
i
][
'
actionData_
'
+
hotZoneArr
[
i
].
gIdx
]
hotZoneItem
[
'
actionData_
'
+
hotZoneItem
.
gIdx
]
=
hotZoneArr
[
i
][
'
actionData_
'
+
hotZoneArr
[
i
].
gIdx
]
...
...
form/src/app/form/form.component.html
View file @
5579fc40
<div
class=
"model-content"
>
<div
class=
"model-content"
>
<div
style=
"padding: 10px;"
>
<div
style=
"padding: 10px;"
>
<!--
<!--
<div style="width: 100%; margin-top: 15px; margin-bottom: 50px;" align="center">
<div style="width: 100%; margin-top: 15px; margin-bottom: 50px;" align="center">
...
@@ -17,14 +17,19 @@
...
@@ -17,14 +17,19 @@
</div>
</div>
-->
-->
<app-custom-hot-zone-mini
<div
*
ngFor=
'let data of item ;index as i'
>
[
bgItem
]="
item
.
bgItem
"
<span>
卡片{{i+1}}
</span>
[
hotZoneItemArr
]="
item
.
hotZoneItemArr
"
<app-custom-hot-zone-mini
[
bgItem
]="
data
.
bgItem
"
[
hotZoneItemArr
]="
data
.
hotZoneItemArr
"
[
customTypeGroupArr
]="
customTypeGroupArr
"
[
customTypeGroupArr
]="
customTypeGroupArr
"
(
save
)="
saveHotZone
(
data
,
$
event
)"
(
del
)="
delHotZone
(
i
)"
>
(
save
)="
saveHotZone
(
item
,
$
event
)"
</app-custom-hot-zone-mini>
>
</div>
<div
style=
"margin-top: 20px; width: 100%; display: inline-flex; align-items: center;justify-content: center;"
>
<button
class=
"save-btn"
nz-button
nzType=
"primary"
[
nzSize
]="'
large
'"
nzShape=
"round"
(
click
)="
addClick
()"
>
<i
nz-icon
nzType=
"save"
></i>
添加新卡片
</button>
</div>
</app-custom-hot-zone-mini>
<!-- <div style="width: 300px;" align='center'>
<!-- <div style="width: 300px;" align='center'>
<span>图1: </span>
<span>图1: </span>
<app-upload-image-with-preview
<app-upload-image-with-preview
...
@@ -56,4 +61,4 @@
...
@@ -56,4 +61,4 @@
</div>
</div>
</div>
</div>
\ No newline at end of file
form/src/app/form/form.component.ts
View file @
5579fc40
...
@@ -15,13 +15,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -15,13 +15,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
item
;
item
;
customTypeGroupArr
=
[
customTypeGroupArr
=
[
{
name
:
'
发音动画
'
,
rect
:
true
,
animaSmall
:
true
,
audio
:
true
,
},
{
{
name
:
'
发音图片
'
,
name
:
'
发音图片
'
,
pic
:
true
,
pic
:
true
,
...
@@ -32,38 +25,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -32,38 +25,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
rect
:
true
,
rect
:
true
,
audio
:
true
,
audio
:
true
,
},
},
{
name
:
'
变化文本
'
,
action
:
{
type
:
'
text
'
,
option
:
[
[
'
fontColor
'
,
'
#000000
'
],
[
'
fontSize
'
,
'
100
'
],
[
'
opacity
'
,
'
0
'
,
'
100
'
]
]
},
},
{
name
:
'
变化图片
'
,
action
:
{
type
:
'
pic
'
,
option
:
[
// ['scale', '1'],
[
'
opacity
'
,
'
0
'
,
'
100
'
]
]
},
},
{
name
:
'
变化动画
'
,
action
:
{
type
:
'
anima
'
,
option
:
[
// ['scale', '1'],
[
'
opacity
'
,
'
0
'
,
'
100
'
]
]
},
},
]
]
constructor
(
private
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
constructor
(
private
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
...
@@ -87,12 +49,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -87,12 +49,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
ngOnInit
()
{
ngOnInit
()
{
this
.
item
=
{}
;
this
.
item
=
[]
;
// 获取存储的数据
// 获取存储的数据
(
<
any
>
window
).
courseware
.
getData
((
data
)
=>
{
(
<
any
>
window
).
courseware
.
getData
((
data
)
=>
{
if
(
data
)
{
if
(
data
&&
data
.
length
)
{
this
.
item
=
data
;
this
.
item
=
data
;
}
}
...
@@ -115,51 +77,25 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -115,51 +77,25 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
}
onSaveCustomAction
(
e
)
{
/** 保存按钮 */
console
.
log
(
'
e:
'
,
e
);
this
.
item
.
customAction
=
e
;
this
.
save
();
}
saveHotZone
(
group
,
e
)
{
saveHotZone
(
group
,
e
)
{
console
.
log
(
'
e:
'
,
e
);
console
.
log
(
'
e:
'
,
e
);
const
{
bgItem
,
hotZoneItemArr
}
=
e
;
const
{
bgItem
,
hotZoneItemArr
}
=
e
;
group
.
bgItem
=
bgItem
;
group
.
bgItem
=
bgItem
;
group
.
hotZoneItemArr
=
hotZoneItemArr
;
group
.
hotZoneItemArr
=
hotZoneItemArr
;
this
.
save
();
this
.
save
();
}
}
/** 删除按钮 */
/**
delHotZone
(
index
:
number
)
{
* 储存图片数据
this
.
item
.
splice
(
index
,
1
)
* @param e
*/
onImageUploadSuccess
(
e
,
key
)
{
this
.
item
[
key
]
=
e
.
url
;
this
.
save
();
}
}
/**
/** 添加按钮 */
* 储存音频数据
addClick
()
{
* @param e
this
.
item
.
push
({})
*/
onAudioUploadSuccess
(
e
,
key
)
{
this
.
item
[
key
]
=
e
.
url
;
this
.
save
();
}
onWordAudioUploadSuccess
(
e
,
idx
)
{
this
.
item
.
wordList
[
idx
].
audio
=
e
.
url
;
this
.
save
();
}
onBackWordAudioUploadSuccess
(
e
,
idx
)
{
this
.
item
.
wordList
[
idx
].
backWordAudio
=
e
.
url
;
this
.
save
();
}
}
/**
/**
...
...
play/assets/scene/anim/tips.anim
View file @
5579fc40
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
{
{
"frame": 0,
"frame": 0,
"value": 255,
"value": 255,
"curve": "c
onstant
"
"curve": "c
ubicIn
"
},
},
{
{
"frame": 0.25,
"frame": 0.25,
"value": 0,
"value": 0,
"curve": "c
onstant
"
"curve": "c
ubicIn
"
},
},
{
{
"frame": 0.5,
"frame": 0.5,
...
...
play/assets/scene/prefab/hitItem.prefab
View file @
5579fc40
...
@@ -21,7 +21,10 @@
...
@@ -21,7 +21,10 @@
"__id__": 2
"__id__": 2
},
},
{
{
"__id__": 5
"__id__": 7
},
{
"__id__": 11
},
},
{
{
"__id__": 14
"__id__": 14
...
@@ -30,11 +33,11 @@
...
@@ -30,11 +33,11 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
18
"__id__":
24
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
19
"__id__":
25
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -46,8 +49,8 @@
...
@@ -46,8 +49,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
0
,
"width":
351
,
"height":
0
"height":
93
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -58,8 +61,8 @@
...
@@ -58,8 +61,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-472.957
,
0
,
-125.868
,
0
,
0,
0,
0,
0,
0,
0,
...
@@ -85,7 +88,7 @@
...
@@ -85,7 +88,7 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
sprite
",
"_name": "
icon_tips
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
"__id__": 1
...
@@ -95,10 +98,16 @@
...
@@ -95,10 +98,16 @@
"_components": [
"_components": [
{
{
"__id__": 3
"__id__": 3
},
{
"__id__": 4
},
{
"__id__": 5
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
4
"__id__":
6
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -110,8 +119,8 @@
...
@@ -110,8 +119,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
351
,
"width":
46
,
"height":
93
"height":
67
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -122,8 +131,8 @@
...
@@ -122,8 +131,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0
,
206.355
,
0
,
64.726
,
0,
0,
0,
0,
0,
0,
...
@@ -163,7 +172,7 @@
...
@@ -163,7 +172,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
c260e7d3-9aa7-46ca-99f5-7ca5f31f7fef
"
"__uuid__": "
b41667f5-0e09-49f6-b7e8-19b88dc8ea8b
"
},
},
"_type": 0,
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 1,
...
@@ -179,6 +188,52 @@
...
@@ -179,6 +188,52 @@
"_atlas": null,
"_atlas": null,
"_id": ""
"_id": ""
},
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "a13d6552-0ece-42e3-813a-2029ad0cab0c"
},
"_clips": [
{
"__uuid__": "a13d6552-0ece-42e3-813a-2029ad0cab0c"
}
],
"playOnLoad": false,
"_id": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 33,
"_left": 0,
"_right": -53.85499999999999,
"_top": -51.726,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{
{
"__type__": "cc.PrefabInfo",
"__type__": "cc.PrefabInfo",
"root": {
"root": {
...
@@ -187,32 +242,28 @@
...
@@ -187,32 +242,28 @@
"asset": {
"asset": {
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
},
},
"fileId": "
b9fWLpmVVF2qpZu9r009Ps
",
"fileId": "
3ffMrh7m1CyZDq4KfPs7IU
",
"sync": false
"sync": false
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
hand
",
"_name": "
bg_quan
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
"__id__": 1
},
},
"_children": [
"_children": [],
"_active": true,
"_components": [
{
{
"__id__":
6
"__id__":
8
},
},
{
{
"__id__": 9
"__id__": 9
}
}
],
],
"_active": true,
"_components": [
{
"__id__": 12
}
],
"_prefab": {
"_prefab": {
"__id__": 1
3
"__id__": 1
0
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -224,8 +275,8 @@
...
@@ -224,8 +275,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
78
,
"width":
391
,
"height":
78
"height":
133
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -236,8 +287,8 @@
...
@@ -236,8 +287,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
154.958
,
0
,
-68.338
,
0
,
0,
0,
0,
0,
0,
0,
...
@@ -261,22 +312,92 @@
...
@@ -261,22 +312,92 @@
"groupIndex": 0,
"groupIndex": 0,
"_id": ""
"_id": ""
},
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "9b336882-962e-447b-9d2c-89aca2bf95b4"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": -20,
"_right": -20,
"_top": -20,
"_bottom": -20,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 170,
"_originalHeight": 100,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
},
"fileId": "5bDJee3rVFeaYgoeDYafmQ",
"sync": false
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
icon_dian
",
"_name": "
sprite
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
5
"__id__":
1
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
7
"__id__":
12
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
8
"__id__":
13
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -288,8 +409,8 @@
...
@@ -288,8 +409,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
49
,
"width":
351
,
"height":
49
"height":
93
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -300,8 +421,8 @@
...
@@ -300,8 +421,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-22.199
,
0
,
34
,
0
,
0,
0,
0,
0,
0,
0,
...
@@ -330,7 +451,7 @@
...
@@ -330,7 +451,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
6
"__id__":
11
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -341,7 +462,7 @@
...
@@ -341,7 +462,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
5daba96f-eff5-4bee-9ba9-d67c0134212a
"
"__uuid__": "
c260e7d3-9aa7-46ca-99f5-7ca5f31f7fef
"
},
},
"_type": 0,
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 1,
...
@@ -365,25 +486,35 @@
...
@@ -365,25 +486,35 @@
"asset": {
"asset": {
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
},
},
"fileId": "
85Cu0e6IdO7rehoMCnMUPa
",
"fileId": "
b9fWLpmVVF2qpZu9r009Ps
",
"sync": false
"sync": false
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
icon_
hand",
"_name": "hand",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
5
"__id__":
1
},
},
"_children": [],
"_children": [
{
"__id__": 15
},
{
"__id__": 18
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 10
"__id__": 21
},
{
"__id__": 22
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
11
"__id__":
23
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -395,7 +526,7 @@
...
@@ -395,7 +526,7 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
69
,
"width":
78
,
"height": 78
"height": 78
},
},
"_anchorPoint": {
"_anchorPoint": {
...
@@ -407,8 +538,72 @@
...
@@ -407,8 +538,72 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
35.1,
-35,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "icon_dian",
"_objFlags": 0,
"_parent": {
"__id__": 14
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 16
}
],
"_prefab": {
"__id__": 17
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 49,
"height": 49
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-22.199,
34,
0,
0,
0,
0,
0,
0,
...
@@ -437,7 +632,7 @@
...
@@ -437,7 +632,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
9
"__id__":
15
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -448,7 +643,7 @@
...
@@ -448,7 +643,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "5
62deefd-c9fd-42f0-97d7-d6f5893ef3f3
"
"__uuid__": "5
daba96f-eff5-4bee-9ba9-d67c0134212a
"
},
},
"_type": 0,
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 1,
...
@@ -472,58 +667,25 @@
...
@@ -472,58 +667,25 @@
"asset": {
"asset": {
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
},
},
"fileId": "b6EBayLo9DCrkpa2CYD+lG",
"fileId": "85Cu0e6IdO7rehoMCnMUPa",
"sync": false
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "110d5a6d-4d4e-4a04-bed2-4bb56c56d03d"
},
"_clips": [
{
"__uuid__": "110d5a6d-4d4e-4a04-bed2-4bb56c56d03d"
}
],
"playOnLoad": false,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
},
"fileId": "9aI5le42RBv5GR0xkx1QW1",
"sync": false
"sync": false
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "icon_
tips
",
"_name": "icon_
hand
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
"__id__": 1
4
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 15
"__id__": 19
},
{
"__id__": 16
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
17
"__id__":
20
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -535,8 +697,8 @@
...
@@ -535,8 +697,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
46
,
"width":
69
,
"height":
67
"height":
78
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -547,8 +709,8 @@
...
@@ -547,8 +709,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
197.886
,
0
,
50.905
,
0
,
0,
0,
0,
0,
0,
0,
...
@@ -577,7 +739,7 @@
...
@@ -577,7 +739,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
4
"__id__": 1
8
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -588,7 +750,7 @@
...
@@ -588,7 +750,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
b41667f5-0e09-49f6-b7e8-19b88dc8ea8b
"
"__uuid__": "
562deefd-c9fd-42f0-97d7-d6f5893ef3f3
"
},
},
"_type": 0,
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 1,
...
@@ -604,6 +766,17 @@
...
@@ -604,6 +766,17 @@
"_atlas": null,
"_atlas": null,
"_id": ""
"_id": ""
},
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
},
"fileId": "b6EBayLo9DCrkpa2CYD+lG",
"sync": false
},
{
{
"__type__": "cc.Animation",
"__type__": "cc.Animation",
"_name": "",
"_name": "",
...
@@ -613,16 +786,43 @@
...
@@ -613,16 +786,43 @@
},
},
"_enabled": true,
"_enabled": true,
"_defaultClip": {
"_defaultClip": {
"__uuid__": "
a13d6552-0ece-42e3-813a-2029ad0cab0c
"
"__uuid__": "
110d5a6d-4d4e-4a04-bed2-4bb56c56d03d
"
},
},
"_clips": [
"_clips": [
{
{
"__uuid__": "
a13d6552-0ece-42e3-813a-2029ad0cab0c
"
"__uuid__": "
110d5a6d-4d4e-4a04-bed2-4bb56c56d03d
"
}
}
],
],
"playOnLoad": false,
"playOnLoad": false,
"_id": ""
"_id": ""
},
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 18,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": -35,
"_horizontalCenter": 0.1,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": false,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{
{
"__type__": "cc.PrefabInfo",
"__type__": "cc.PrefabInfo",
"root": {
"root": {
...
@@ -631,7 +831,7 @@
...
@@ -631,7 +831,7 @@
"asset": {
"asset": {
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
},
},
"fileId": "
b5M1Vy7ipFF48OYApT5qKk
",
"fileId": "
9aI5le42RBv5GR0xkx1QW1
",
"sync": false
"sync": false
},
},
{
{
...
@@ -642,10 +842,16 @@
...
@@ -642,10 +842,16 @@
"__id__": 1
"__id__": 1
},
},
"_enabled": true,
"_enabled": true,
"quan": {
"__id__": 7
},
"tipsAnim": {
"tipsAnim": {
"__id__":
16
"__id__":
4
},
},
"handAnim": {
"handAnim": {
"__id__": 21
},
"sprite": {
"__id__": 12
"__id__": 12
},
},
"_id": ""
"_id": ""
...
...
play/assets/scene/scene/hitItem.js
0 → 100644
View file @
5579fc40
const
tools
=
require
(
"
../script/tools
"
);
cc
.
Class
({
extends
:
cc
.
Component
,
properties
:
{
quan
:
cc
.
Node
,
tipsAnim
:
cc
.
Animation
,
handAnim
:
cc
.
Animation
,
sprite
:
cc
.
Sprite
},
data
:
null
,
onLoad
()
{
this
.
quan
.
active
=
false
this
.
tipsAnim
.
node
.
active
=
false
this
.
handAnim
.
node
.
active
=
false
},
onEnable
()
{
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
)
},
onDisable
()
{
this
.
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
)
},
initWithData
(
data
,
scale
)
{
console
.
log
(
scale
)
this
.
data
=
data
let
rect
=
this
.
data
.
rect
this
.
node
.
x
=
(
rect
.
x
+
rect
.
width
/
2
)
/
scale
this
.
node
.
y
=
(
-
rect
.
y
-
rect
.
height
/
2
)
/
scale
this
.
node
.
width
=
rect
.
width
/
scale
this
.
node
.
height
=
rect
.
height
/
scale
console
.
log
(
this
.
node
)
this
.
sprite
.
node
.
active
=
false
if
(
data
.
useHand
)
{
this
.
handAnim
.
node
.
active
=
true
this
.
handAnim
.
play
()
}
let
comps
=
this
.
getComponentsInChildren
(
cc
.
Widget
)
for
(
let
one
of
comps
)
{
one
.
updateAlignment
()
}
this
.
audioId
=
null
},
onTouchStart
()
{
if
(
this
.
audioId
)
return
if
(
this
.
data
)
{
let
url
=
this
.
data
.
audio_url
if
(
url
&&
url
!=
''
)
{
this
.
playAudio
(
url
)
this
.
tipsAnim
.
node
.
active
=
true
this
.
tipsAnim
.
play
()
}
if
(
this
.
data
.
pic_url
)
{
tools
.
getSpriteFrimeByUrl
(
this
.
data
.
pic_url
,
(
sp
)
=>
{
this
.
sprite
.
spriteFrame
=
sp
this
.
sprite
.
node
.
width
=
this
.
node
.
width
this
.
sprite
.
node
.
height
=
this
.
node
.
height
this
.
sprite
.
node
.
active
=
true
})
}
if
(
this
.
data
.
useBorder
)
{
this
.
quan
.
active
=
true
}
this
.
handAnim
.
stop
()
this
.
handAnim
.
node
.
active
=
false
}
},
/** 播放音乐 */
playAudio
(
url
)
{
cc
.
assetManager
.
loadRemote
(
url
,
(
err
,
audioClip
)
=>
{
if
(
err
)
return
cc
.
systemEvent
.
once
(
'
stopMusic
'
,
this
.
stopAudio
,
this
)
this
.
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
cc
.
audioEngine
.
setFinishCallback
(
this
.
audioId
,
this
.
stopAudio
.
bind
(
this
));
});
},
stopAudio
()
{
if
(
this
.
audioId
!=
null
)
{
cc
.
audioEngine
.
stop
(
this
.
audioId
)
this
.
audioId
=
null
this
.
quan
.
active
=
false
this
.
tipsAnim
.
stop
()
this
.
tipsAnim
.
node
.
active
=
false
this
.
sprite
.
node
.
active
=
false
if
(
this
.
data
.
useHand
)
{
this
.
handAnim
.
node
.
active
=
true
this
.
handAnim
.
play
()
}
cc
.
systemEvent
.
off
(
'
stopMusic
'
,
this
.
stopAudio
,
this
)
}
},
/** 音频id */
audioId
:
null
,
});
play/assets/scene/scene/hitItem.js.meta
0 → 100644
View file @
5579fc40
{
"ver": "1.0.8",
"uuid": "57f79280-6f4b-4d53-b1e3-1cca543a4d9e",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
play/assets/scene/scene/picNode.js
View file @
5579fc40
const
tools
=
require
(
"
../script/tools
"
);
cc
.
Class
({
cc
.
Class
({
extends
:
cc
.
Component
,
extends
:
cc
.
Component
,
properties
:
{
properties
:
{
tipsAnim
:
cc
.
Animation
,
hitPre
:
cc
.
Prefab
,
handAnim
:
cc
.
Animation
,
borders
:
[
cc
.
Node
]
},
},
data
:
null
,
onLoad
()
{
onLoad
()
{
this
.
tipsAnim
.
node
.
active
=
false
this
.
_hitItem
=
[]
this
.
handAnim
.
node
.
active
=
false
this
.
_items
=
this
.
node
.
getChildByName
(
'
items
'
)
},
this
.
_sprite
=
this
.
getComponentInChildren
(
cc
.
Sprite
)
onEnable
()
{
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
)
},
onDisable
()
{
this
.
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
)
},
},
initWithData
(
data
)
{
initWithData
(
data
)
{
this
.
data
=
data
this
.
clearItems
()
let
rect
=
this
.
data
.
rect
tools
.
getSpriteFrimeByUrl
(
data
.
bgItem
.
url
,
(
sp
)
=>
{
this
.
node
.
x
=
rect
.
x
let
rect
=
sp
.
getRect
()
this
.
node
.
y
=
rect
.
y
let
scale
=
rect
.
width
/
rect
.
height
this
.
node
.
width
=
rect
.
width
let
originRect
=
cc
.
size
(
1280
,
720
)
this
.
node
.
height
=
r
ect
.
height
let
originScale
=
originRect
.
width
/
originR
ect
.
height
if
(
this
.
data
.
useHand
)
{
if
(
scale
<
originScale
)
{
this
.
handAnim
.
node
.
active
=
false
scale
=
rect
.
height
/
originRect
.
height
this
.
handAnim
.
play
()
let
width
=
rect
.
width
/
scale
}
this
.
node
.
width
=
width
},
this
.
node
.
height
=
originRect
.
height
onTouchStart
()
{
}
else
if
(
scale
>
originScale
)
{
if
(
this
.
data
)
{
scale
=
rect
.
width
/
originRect
.
width
let
url
=
this
.
data
.
audio_url
this
.
node
.
height
=
rect
.
height
/
scale
if
(
url
&&
url
!=
''
)
{
this
.
node
.
width
=
originRect
.
width
this
.
playAudio
(
url
)
}
else
{
scale
=
rect
.
width
/
originRect
.
width
this
.
node
.
width
=
originRect
.
width
this
.
node
.
height
=
originRect
.
height
}
}
}
this
.
borders
[
0
].
x
=
-
this
.
node
.
width
/
2
},
this
.
borders
[
1
].
x
=
this
.
node
.
width
/
2
this
.
_sprite
.
spriteFrame
=
sp
/** 播放音乐 */
this
.
_sprite
.
node
.
width
=
this
.
node
.
width
playAudio
(
url
)
{
this
.
_sprite
.
node
.
height
=
this
.
node
.
height
cc
.
assetManager
.
loadRemote
(
url
,
(
err
,
audioClip
)
=>
{
this
.
_items
.
width
=
this
.
node
.
width
if
(
err
)
return
this
.
_items
.
height
=
this
.
node
.
height
this
.
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
this
.
_items
.
x
=
-
this
.
node
.
width
/
2
cc
.
audioEngine
.
setFinishCallback
(
this
.
audioId
,
()
=>
{
this
.
_items
.
y
=
this
.
node
.
height
/
2
this
.
audioId
=
null
scale
=
data
.
bgItem
.
rect
.
width
/
this
.
node
.
width
});
//初始化点击区域
});
let
node
,
comp
for
(
let
data
of
data
.
hotZoneItemArr
)
{
node
=
cc
.
instantiate
(
this
.
hitPre
)
this
.
_items
.
addChild
(
node
)
comp
=
node
.
getComponent
(
'
hitItem
'
)
comp
.
initWithData
(
data
,
scale
)
this
.
_hitItem
.
push
(
node
)
}
})
},
},
stopAudio
()
{
/** 清除item */
if
(
this
.
audioId
!=
null
)
{
clearItems
()
{
cc
.
audioEngine
.
stop
(
this
.
audioId
)
this
.
_items
.
removeAllChildren
(
true
)
this
.
audioId
=
null
this
.
_hitItem
.
length
=
0
}
}
},
/** 音频id */
audioId
:
null
,
});
});
play/assets/scene/scene/picNode.js.meta
View file @
5579fc40
{
{
"ver": "1.0.8",
"ver": "1.0.8",
"uuid": "
57f79280-6f4b-4d53-b1e3-1cca543a4d9e
",
"uuid": "
fccd4db5-30ec-4b66-aea2-c29fd0c0301f
",
"isPlugin": false,
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInNative": true,
...
...
play/assets/scene/scene/scene.fire
View file @
5579fc40
...
@@ -78,22 +78,22 @@
...
@@ -78,22 +78,22 @@
"__id__": 8
"__id__": 8
},
},
{
{
"__id__":
21
"__id__":
18
},
},
{
{
"__id__":
37
"__id__":
28
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 4
1
"__id__": 4
0
},
},
{
{
"__id__": 4
2
"__id__": 4
1
},
},
{
{
"__id__": 4
3
"__id__": 4
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -368,7 +368,7 @@
...
@@ -368,7 +368,7 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
bottomPart
",
"_name": "
pic
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
...
@@ -378,7 +378,10 @@
...
@@ -378,7 +378,10 @@
"__id__": 9
"__id__": 9
},
},
{
{
"__id__": 11
"__id__": 12
},
{
"__id__": 13
},
},
{
{
"__id__": 15
"__id__": 15
...
@@ -387,10 +390,7 @@
...
@@ -387,10 +390,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 19
"__id__": 17
},
{
"__id__": 20
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -404,8 +404,8 @@
...
@@ -404,8 +404,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
351
,
"width":
1280
,
"height":
91
"height":
720
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -416,8 +416,8 @@
...
@@ -416,8 +416,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
464.5
,
0
,
-314.5
,
0
,
0,
0,
0,
0,
0,
0,
...
@@ -425,7 +425,7 @@
...
@@ -425,7 +425,7 @@
1,
1,
1,
1,
1,
1,
1
0
]
]
},
},
"_eulerAngles": {
"_eulerAngles": {
...
@@ -439,11 +439,11 @@
...
@@ -439,11 +439,11 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
8c7k8ep/ZFNpO263+1QHz9
"
"_id": "
acFf5706VEr43k/0GoDH2k
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
bg_bottom
",
"_name": "
icon
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 8
"__id__": 8
...
@@ -453,6 +453,9 @@
...
@@ -453,6 +453,9 @@
"_components": [
"_components": [
{
{
"__id__": 10
"__id__": 10
},
{
"__id__": 11
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -466,8 +469,8 @@
...
@@ -466,8 +469,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
351
,
"width":
1280
,
"height":
93
"height":
720
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -501,7 +504,7 @@
...
@@ -501,7 +504,7 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
70X2WruCtItoUrT7FmCz3I
"
"_id": "
e5gAWSYXpPDJKuNiEvXpPT
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
...
@@ -516,13 +519,11 @@
...
@@ -516,13 +519,11 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
}
],
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": null,
"__uuid__": "c260e7d3-9aa7-46ca-99f5-7ca5f31f7fef"
},
"_type": 0,
"_type": 0,
"_sizeMode":
1
,
"_sizeMode":
0
,
"_fillType": 0,
"_fillType": 0,
"_fillCenter": {
"_fillCenter": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -533,25 +534,45 @@
...
@@ -533,25 +534,45 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "c7OVcCQjtDmrknFQVhXiA3"
"_id": "0eTbXG/oZHmaY6kD6zm9pf"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 636,
"_originalHeight": 396,
"_id": "4dr1MJnPlIVJruDphUKxu4"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
btn_left
",
"_name": "
items
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 8
"__id__": 8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [],
{
"__id__": 12
},
{
"__id__": 14
}
],
"_prefab": null,
"_prefab": null,
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -563,20 +584,20 @@
...
@@ -563,20 +584,20 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
64
,
"width":
720
,
"height":
68
"height":
720
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y":
0.5
"y":
1
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-
16.572
,
-
360
,
3
.038
,
3
60
,
0,
0,
0,
0,
0,
0,
...
@@ -584,7 +605,7 @@
...
@@ -584,7 +605,7 @@
1,
1,
1,
1,
1,
1,
0
1
]
]
},
},
"_eulerAngles": {
"_eulerAngles": {
...
@@ -598,96 +619,76 @@
...
@@ -598,96 +619,76 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
5ad2wLQLxIN5Eg7OHecSH6
"
"_id": "
3a4oi+4+9Ka6PX0pprclAn
"
},
},
{
{
"__type__": "cc.
Button
",
"__type__": "cc.
Node
",
"_name": "",
"_name": "
bg_move
",
"_objFlags": 0,
"_objFlags": 0,
"
node
": {
"
_parent
": {
"__id__":
11
"__id__":
8
},
},
"_enabled": true,
"_children": [],
"_normalMaterial": null,
"_active": true,
"_grayMaterial": null,
"_components": [
"duration": 0.1,
"zoomScale": 1.1,
"clickEvents": [
{
{
"__id__": 1
3
"__id__": 1
4
}
}
],
],
"_N$interactable": true,
"_prefab": null,
"_N$enableAutoGrayEffect": false,
"_opacity": 255,
"_N$transition": 3,
"_color": {
"transition": 3,
"_N$normalColor": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 255,
"r": 255,
"g": 255,
"g": 255,
"b": 255,
"b": 255,
"a": 255
"a": 255
},
},
"_N$pressedColor": {
"_contentSize": {
"__type__": "cc.Color",
"__type__": "cc.Size",
"r": 211,
"width": 14,
"g": 211,
"height": 720
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
},
"hoverColor": {
"_anchorPoint": {
"__type__": "cc.Color",
"__type__": "cc.Vec2",
"r": 255,
"x": 1,
"g": 255,
"y": 0.5
"b": 255,
"a": 255
},
},
"_N$disabledColor": {
"_trs": {
"__type__": "cc.Color",
"__type__": "TypedArray",
"r": 124,
"ctor": "Float64Array",
"g": 124,
"array": [
"b": 124,
-626,
"a": 255
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
},
"_N$normalSprite": null,
"_eulerAngles": {
"_N$pressedSprite": null,
"__type__": "cc.Vec3",
"pressedSprite": null,
"x": 0,
"_N$hoverSprite": null,
"y": 0,
"hoverSprite": null,
"z": 0
"_N$disabledSprite": null,
"_N$target": null,
"_id": "bcYN/4EKBJhbIAfovo9Ah1"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
},
"component": "",
"_skewX": 0,
"_componentId": "f4edeRi+NdAabqAkVYRwFjK",
"_skewY": 0,
"handler": "onClickLeft",
"_is3DNode": false,
"customEventData": ""
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b1AJm2yKhN/acMtHJgQehF"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
1
"__id__": 1
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -698,7 +699,7 @@
...
@@ -698,7 +699,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
481337f5-a635-4237-8a67-7a37fd59f119
"
"__uuid__": "
65989243-03ad-4572-894a-c1d4712ce82c
"
},
},
"_type": 0,
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 1,
...
@@ -712,11 +713,11 @@
...
@@ -712,11 +713,11 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
93zcHsRZhA7783yB/mBlqo
"
"_id": "
5fTjKmnRVNWbSuQoPv3XkW
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "b
tn_right
",
"_name": "b
g_move
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 8
"__id__": 8
...
@@ -726,9 +727,6 @@
...
@@ -726,9 +727,6 @@
"_components": [
"_components": [
{
{
"__id__": 16
"__id__": 16
},
{
"__id__": 18
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -742,20 +740,20 @@
...
@@ -742,20 +740,20 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
6
4,
"width":
1
4,
"height":
68
"height":
720
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
"y": 0.5
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
97.71
,
626
,
3.038
,
0
,
0,
0,
0,
0,
0,
0,
...
@@ -763,7 +761,7 @@
...
@@ -763,7 +761,7 @@
1,
1,
1,
1,
1,
1,
0
1
]
]
},
},
"_eulerAngles": {
"_eulerAngles": {
...
@@ -777,107 +775,25 @@
...
@@ -777,107 +775,25 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
46i3stdzpHX6zQHTGnRsNE
"
"_id": "
b7MYFimtJFk7j7n2He4McM
"
},
},
{
{
"__type__": "cc.
Button
",
"__type__": "cc.
Sprite
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 15
"__id__": 15
},
},
"_enabled": true,
"_enabled": true,
"_normalMaterial": null,
"_materials": [
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.1,
"clickEvents": [
{
{
"__
id__": 17
"__
uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
}
],
],
"_N$interactable": true,
"_srcBlendFactor": 770,
"_N$enableAutoGrayEffect": false,
"_dstBlendFactor": 771,
"_N$transition": 3,
"_spriteFrame": {
"transition": 3,
"__uuid__": "65989243-03ad-4572-894a-c1d4712ce82c"
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "1aj32fYY1IxLesa77E70Qu"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "f4edeRi+NdAabqAkVYRwFjK",
"handler": "onClickRight",
"customEventData": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7546a333-1d8b-4c3a-a699-b24633d987d3"
},
},
"_type": 0,
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 1,
...
@@ -891,76 +807,56 @@
...
@@ -891,76 +807,56 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
d4dDRX1SZIy517c6gzyxSO
"
"_id": "
f3HU4Zr+JKrYkZypEh60Di
"
},
},
{
{
"__type__": "
cc.Widget
",
"__type__": "
fccd421MOxLZq6iwp/QwDAf
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
"__id__": 8
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"hitPre": {
"_target": null,
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
"_alignFlags": 36,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "14yYhIw95BeZx56bjhZzfB"
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
},
"_enabled": true,
"borders": [
"_defaultClip": null,
{
"_clips": [
"__id__": 13
null
},
{
"__id__": 15
}
],
],
"playOnLoad": false,
"_id": "25htXxEOZC+47ROkvoLV/U"
"_id": "35I3F/iNRHf7w06yWJoxEu"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "pic",
"_name": "pic
_temp
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
},
},
"_children": [
"_children": [
{
{
"__id__": 22
"__id__": 19
},
{
"__id__": 25
},
},
{
{
"__id__": 2
8
"__id__": 2
2
},
},
{
{
"__id__":
31
"__id__":
23
},
},
{
{
"__id__":
34
"__id__":
25
}
}
],
],
"_active": true,
"_active": true,
"_components": [],
"_components": [
{
"__id__": 27
}
],
"_prefab": null,
"_prefab": null,
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -984,7 +880,7 @@
...
@@ -984,7 +880,7 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
-128
0,
0,
0,
0,
0,
0,
0,
...
@@ -1007,23 +903,23 @@
...
@@ -1007,23 +903,23 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
acFf5706VEr43k/0GoDH2k
"
"_id": "
f5uVe6L1lNmYEspgnFI0dX
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "icon",
"_name": "icon",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
21
"__id__":
18
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
3
"__id__": 2
0
},
},
{
{
"__id__": 2
4
"__id__": 2
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1037,8 +933,8 @@
...
@@ -1037,8 +933,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 12
80
,
"width": 12
66
,
"height": 7
20
"height": 7
06
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1058,7 +954,7 @@
...
@@ -1058,7 +954,7 @@
1,
1,
1,
1,
1,
1,
1
0
]
]
},
},
"_eulerAngles": {
"_eulerAngles": {
...
@@ -1072,14 +968,14 @@
...
@@ -1072,14 +968,14 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "e
5gAWSYXpPDJKuNiEvXpPT
"
"_id": "e
759xQxcRBDZCN5l4fsqO0
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
22
"__id__":
19
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1102,23 +998,23 @@
...
@@ -1102,23 +998,23 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "0e
TbXG/oZHmaY6kD6zm9pf
"
"_id": "0e
Sa63fVNKKLV/1Jn+eg8n
"
},
},
{
{
"__type__": "cc.Widget",
"__type__": "cc.Widget",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
22
"__id__":
19
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 2,
"alignMode": 2,
"_target": null,
"_target": null,
"_alignFlags": 45,
"_alignFlags": 45,
"_left":
0
,
"_left":
7
,
"_right":
0
,
"_right":
7
,
"_top":
0
,
"_top":
7
,
"_bottom":
0
,
"_bottom":
7
,
"_verticalCenter": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsLeft": true,
...
@@ -1127,25 +1023,80 @@
...
@@ -1127,25 +1023,80 @@
"_isAbsBottom": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 636,
"_originalWidth": 650,
"_originalHeight": 396,
"_originalHeight": 410,
"_id": "4dr1MJnPlIVJruDphUKxu4"
"_id": "fbCrzYGGRFTKesyrZuyvHE"
},
{
"__type__": "cc.Node",
"_name": "items",
"_objFlags": 0,
"_parent": {
"__id__": 18
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1274,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "60JG0g75NIdb8hWvDUsLMj"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "bg_move",
"_name": "bg_move",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
21
"__id__":
18
},
},
"_children": [],
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
"_components": [
{
{
"__id__": 26
"__id__": 24
},
{
"__id__": 27
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1164,14 +1115,14 @@
...
@@ -1164,14 +1115,14 @@
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x":
0.5
,
"x":
1
,
"y": 0.5
"y": 0.5
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-6
33
,
-6
26
,
0,
0,
0,
0,
0,
0,
...
@@ -1194,14 +1145,14 @@
...
@@ -1194,14 +1145,14 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
b1AJm2yKhN/acMtHJgQehF
"
"_id": "
19E+V10BFOSZf5OhlQKDMs
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
5
"__id__": 2
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1226,50 +1177,20 @@
...
@@ -1226,50 +1177,20 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "5fTjKmnRVNWbSuQoPv3XkW"
"_id": "f3RicpoHxHIqhCyvoq5hrx"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "a8Ih7yZaRBdZUYRQo7VeiV"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "bg_move",
"_name": "bg_move",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
21
"__id__":
18
},
},
"_children": [],
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
"_components": [
{
{
"__id__": 29
"__id__": 26
},
{
"__id__": 30
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1288,14 +1209,14 @@
...
@@ -1288,14 +1209,14 @@
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
"y": 0.5
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
6
33
,
6
26
,
0,
0,
0,
0,
0,
0,
...
@@ -1318,14 +1239,14 @@
...
@@ -1318,14 +1239,14 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
b7MYFimtJFk7j7n2He4McM
"
"_id": "
04/r+P/w9Ebakr7iCQgWBs
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
8
"__id__": 2
5
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1350,50 +1271,51 @@
...
@@ -1350,50 +1271,51 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
f3HU4Zr+JKrYkZypEh60Di
"
"_id": "
65yTQDAFRIS7EPA699rdi4
"
},
},
{
{
"__type__": "
cc.Widget
",
"__type__": "
fccd421MOxLZq6iwp/QwDAf
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
2
8
"__id__":
1
8
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"hitPre": {
"_target": null,
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
"_alignFlags": 32,
},
"_left": 0,
"borders": [
"_right": 0,
{
"_top": 0,
"__id__": 23
"_bottom": 0,
},
"_verticalCenter": 0,
{
"_horizontalCenter": 0,
"__id__": 25
"_isAbsLeft": true,
}
"_isAbsRight": true,
],
"_isAbsTop": true,
"_id": "89aCQ7yHtOn4s8onn5MbAu"
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "64EsoeEF5BsYPgaBKs5n9+"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "b
g_move
",
"_name": "b
ottomPart
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
1
"__id__": 2
},
},
"_children": [],
"_children": [
"_active": false,
"_components": [
{
{
"__id__":
32
"__id__":
29
},
},
{
{
"__id__": 33
"__id__": 31
},
{
"__id__": 35
}
],
"_active": true,
"_components": [
{
"__id__": 39
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1407,8 +1329,8 @@
...
@@ -1407,8 +1329,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
14
,
"width":
351
,
"height":
1280
"height":
91
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1419,13 +1341,13 @@
...
@@ -1419,13 +1341,13 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
464.5,
-314.5,
0,
0,
368.418,
0,
0,
0,
0,
0,
0,
0.7071067811865475,
1,
0.7071067811865476,
1,
1,
1,
1,
1
1
...
@@ -1435,48 +1357,83 @@
...
@@ -1435,48 +1357,83 @@
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 0,
"x": 0,
"y": 0,
"y": 0,
"z":
9
0
"z": 0
},
},
"_skewX": 0,
"_skewX": 0,
"_skewY": 0,
"_skewY": 0,
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
dc73Fb5SlD7J/vFGJ1/xcP
"
"_id": "
8c7k8ep/ZFNpO263+1QHz9
"
},
},
{
{
"__type__": "cc.
Widget
",
"__type__": "cc.
Node
",
"_name": "",
"_name": "
bg_bottom
",
"_objFlags": 0,
"_objFlags": 0,
"
node
": {
"
_parent
": {
"__id__":
31
"__id__":
28
},
},
"_enabled": true,
"_children": [],
"alignMode": 1,
"_active": true,
"_target": null,
"_components": [
"_alignFlags": 41,
{
"_left": 633,
"__id__": 30
"_right": 633,
}
"_top": -648.418,
],
"_bottom": 0,
"_prefab": null,
"_verticalCenter": 0,
"_opacity": 255,
"_horizontalCenter": 0,
"_color": {
"_isAbsLeft": true,
"__type__": "cc.Color",
"_isAbsRight": true,
"r": 255,
"_isAbsTop": true,
"g": 255,
"_isAbsBottom": true,
"b": 255,
"_isAbsHorizontalCenter": true,
"a": 255
"_isAbsVerticalCenter": true,
},
"_originalWidth": 14,
"_contentSize": {
"_originalHeight": 0,
"__type__": "cc.Size",
"_id": "60dJ16FZlGEYegzpqEv8gI"
"width": 351,
"height": 93
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "70X2WruCtItoUrT7FmCz3I"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
31
"__id__":
29
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1487,10 +1444,10 @@
...
@@ -1487,10 +1444,10 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
65989243-03ad-4572-894a-c1d4712ce82c
"
"__uuid__": "
c260e7d3-9aa7-46ca-99f5-7ca5f31f7fef
"
},
},
"_type":
2
,
"_type":
0
,
"_sizeMode":
0
,
"_sizeMode":
1
,
"_fillType": 0,
"_fillType": 0,
"_fillCenter": {
"_fillCenter": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1501,23 +1458,23 @@
...
@@ -1501,23 +1458,23 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
fdbhfWO25KXaUT3pi6g/DW
"
"_id": "
c7OVcCQjtDmrknFQVhXiA3
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "b
g_move
",
"_name": "b
tn_left
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
1
"__id__": 2
8
},
},
"_children": [],
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
"_components": [
{
{
"__id__": 3
5
"__id__": 3
2
},
},
{
{
"__id__": 3
6
"__id__": 3
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1531,8 +1488,8 @@
...
@@ -1531,8 +1488,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
1
4,
"width":
6
4,
"height":
1280
"height":
68
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1543,64 +1500,119 @@
...
@@ -1543,64 +1500,119 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-16.572,
3.038,
0,
0,
-369.556,
0,
0,
0,
0,
0,
0,
0.7071067811865475,
0.7071067811865476,
1,
1,
1,
1,
1
1,
0
]
]
},
},
"_eulerAngles": {
"_eulerAngles": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 0,
"x": 0,
"y": 0,
"y": 0,
"z":
9
0
"z": 0
},
},
"_skewX": 0,
"_skewX": 0,
"_skewY": 0,
"_skewY": 0,
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
90trfmqXlIi62ExYNzN4I5
"
"_id": "
5ad2wLQLxIN5Eg7OHecSH6
"
},
},
{
{
"__type__": "cc.
Widget
",
"__type__": "cc.
Button
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 3
4
"__id__": 3
1
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"_normalMaterial": null,
"_target": null,
"_grayMaterial": null,
"_alignFlags": 41,
"duration": 0.1,
"_left": 633,
"zoomScale": 1.1,
"_right": 633,
"clickEvents": [
"_top": 89.55599999999998,
{
"_bottom": 0,
"__id__": 33
"_verticalCenter": 0,
}
"_horizontalCenter": 0,
],
"_isAbsLeft": true,
"_N$interactable": true,
"_isAbsRight": true,
"_N$enableAutoGrayEffect": false,
"_isAbsTop": true,
"_N$transition": 3,
"_isAbsBottom": true,
"transition": 3,
"_isAbsHorizontalCenter": true,
"_N$normalColor": {
"_isAbsVerticalCenter": true,
"__type__": "cc.Color",
"_originalWidth": 14,
"r": 255,
"_originalHeight": 0,
"g": 255,
"_id": "5cVY3BafxL3pwuCJufNQJg"
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "bcYN/4EKBJhbIAfovo9Ah1"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "c238bwNxXtAHqIXQECY4nQz",
"handler": "onClickLeft",
"customEventData": ""
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 3
4
"__id__": 3
1
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1611,10 +1623,10 @@
...
@@ -1611,10 +1623,10 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
65989243-03ad-4572-894a-c1d4712ce82c
"
"__uuid__": "
481337f5-a635-4237-8a67-7a37fd59f119
"
},
},
"_type":
2
,
"_type":
0
,
"_sizeMode":
0
,
"_sizeMode":
1
,
"_fillType": 0,
"_fillType": 0,
"_fillCenter": {
"_fillCenter": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1625,22 +1637,25 @@
...
@@ -1625,22 +1637,25 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
4c/3rfzz1AkLG+k9qBfc0h
"
"_id": "
93zcHsRZhA7783yB/mBlqo
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
pic_temp
",
"_name": "
btn_right
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
8
},
},
"_children": [
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
},
{
{
"__id__": 38
"__id__": 38
}
}
],
],
"_active": true,
"_components": [],
"_prefab": null,
"_prefab": null,
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1652,8 +1667,8 @@
...
@@ -1652,8 +1667,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 6
50
,
"width": 6
4
,
"height":
410
"height":
68
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1664,8 +1679,8 @@
...
@@ -1664,8 +1679,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-1274
,
97.71
,
0
,
3.038
,
0,
0,
0,
0,
0,
0,
...
@@ -1687,79 +1702,96 @@
...
@@ -1687,79 +1702,96 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
f5uVe6L1lNmYEspgnFI0dX
"
"_id": "
46i3stdzpHX6zQHTGnRsNE
"
},
},
{
{
"__type__": "cc.
Node
",
"__type__": "cc.
Button
",
"_name": "
icon
",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"
_parent
": {
"
node
": {
"__id__": 3
7
"__id__": 3
5
},
},
"_
children": []
,
"_
enabled": true
,
"_
active": true
,
"_
normalMaterial": null
,
"_
components": [
"_
grayMaterial": null,
{
"duration": 0.1,
"__id__": 39
"zoomScale": 1.1,
},
"clickEvents": [
{
{
"__id__":
40
"__id__":
37
}
}
],
],
"_prefab": null,
"_N$interactable": true,
"_opacity": 255,
"_N$enableAutoGrayEffect": false,
"_color": {
"_N$transition": 3,
"transition": 3,
"_N$normalColor": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 255,
"r": 255,
"g": 255,
"g": 255,
"b": 255,
"b": 255,
"a": 255
"a": 255
},
},
"_contentSize": {
"_N$pressedColor": {
"__type__": "cc.Size",
"__type__": "cc.Color",
"width": 636,
"r": 211,
"height": 396
"g": 211,
"b": 211,
"a": 255
},
},
"_anchorPoint": {
"pressedColor": {
"__type__": "cc.Vec2",
"__type__": "cc.Color",
"x": 0.5,
"r": 211,
"y": 0.5
"g": 211,
"b": 211,
"a": 255
},
},
"_trs": {
"_N$hoverColor": {
"__type__": "TypedArray",
"__type__": "cc.Color",
"ctor": "Float64Array",
"r": 255,
"array": [
"g": 255,
0,
"b": 255,
0,
"a": 255
0,
0,
0,
0,
1,
1,
1,
0
]
},
},
"_eulerAngles": {
"hoverColor": {
"__type__": "cc.Vec3",
"__type__": "cc.Color",
"x": 0,
"r": 255,
"y": 0,
"g": 255,
"z": 0
"b": 255,
"a": 255
},
},
"_skewX": 0,
"_N$disabledColor": {
"_skewY": 0,
"__type__": "cc.Color",
"_is3DNode": false,
"r": 124,
"_groupIndex": 0,
"g": 124,
"groupIndex": 0,
"b": 124,
"_id": "e759xQxcRBDZCN5l4fsqO0"
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "1aj32fYY1IxLesa77E70Qu"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "c238bwNxXtAHqIXQECY4nQz",
"handler": "onClickRight",
"customEventData": ""
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 3
8
"__id__": 3
5
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1767,11 +1799,13 @@
...
@@ -1767,11 +1799,13 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
}
],
],
"_srcBlendFactor":
1
,
"_srcBlendFactor":
770
,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_spriteFrame": {
"__uuid__": "7546a333-1d8b-4c3a-a699-b24633d987d3"
},
"_type": 0,
"_type": 0,
"_sizeMode":
0
,
"_sizeMode":
1
,
"_fillType": 0,
"_fillType": 0,
"_fillCenter": {
"_fillCenter": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1782,23 +1816,23 @@
...
@@ -1782,23 +1816,23 @@
"_fillRange": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_atlas": null,
"_atlas": null,
"_id": "
0eSa63fVNKKLV/1Jn+eg8n
"
"_id": "
d4dDRX1SZIy517c6gzyxSO
"
},
},
{
{
"__type__": "cc.Widget",
"__type__": "cc.Widget",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
3
8
"__id__":
2
8
},
},
"_enabled": true,
"_enabled": true,
"alignMode":
2
,
"alignMode":
1
,
"_target": null,
"_target": null,
"_alignFlags":
45
,
"_alignFlags":
36
,
"_left":
7
,
"_left":
0
,
"_right":
7
,
"_right":
0
,
"_top":
7
,
"_top":
0
,
"_bottom":
7
,
"_bottom":
0
,
"_verticalCenter": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsLeft": true,
...
@@ -1807,9 +1841,9 @@
...
@@ -1807,9 +1841,9 @@
"_isAbsBottom": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth":
65
0,
"_originalWidth": 0,
"_originalHeight":
41
0,
"_originalHeight": 0,
"_id": "
fbCrzYGGRFTKesyrZuyvHE
"
"_id": "
14yYhIw95BeZx56bjhZzfB
"
},
},
{
{
"__type__": "cc.Canvas",
"__type__": "cc.Canvas",
...
@@ -1864,16 +1898,16 @@
...
@@ -1864,16 +1898,16 @@
},
},
"_enabled": true,
"_enabled": true,
"picNode": {
"picNode": {
"__id__":
21
"__id__":
8
},
},
"picTempNode": {
"picTempNode": {
"__id__":
37
"__id__":
18
},
},
"leftNode": {
"leftNode": {
"__id__":
1
1
"__id__":
3
1
},
},
"rightNode": {
"rightNode": {
"__id__":
1
5
"__id__":
3
5
},
},
"btnClip": {
"btnClip": {
"__uuid__": "39ef1939-3bf9-4d21-a67a-bc1dede521a9"
"__uuid__": "39ef1939-3bf9-4d21-a67a-bc1dede521a9"
...
...
play/assets/scene/sc
ript
/scene.js
→
play/assets/scene/sc
ene
/scene.js
View file @
5579fc40
import
{
tools
}
from
"
./tools
"
;
const
tools
=
require
(
"
./tools
"
);
cc
.
Class
({
cc
.
Class
({
extends
:
cc
.
Component
,
extends
:
cc
.
Component
,
...
@@ -64,7 +65,6 @@ cc.Class({
...
@@ -64,7 +65,6 @@ cc.Class({
sy
=
frameSize
.
height
/
this
.
_designSize
.
height
;
sy
=
frameSize
.
height
/
this
.
_designSize
.
height
;
this
.
_mapScaleMin
=
Math
.
min
(
sx
,
sy
)
*
this
.
_cocosScale
;
this
.
_mapScaleMin
=
Math
.
min
(
sx
,
sy
)
*
this
.
_cocosScale
;
this
.
_mapScaleMax
=
Math
.
max
(
sx
,
sy
)
*
this
.
_cocosScale
;
this
.
_mapScaleMax
=
Math
.
max
(
sx
,
sy
)
*
this
.
_cocosScale
;
this
.
originRect
=
cc
.
size
(
1280
,
720
)
},
},
...
@@ -88,36 +88,20 @@ cc.Class({
...
@@ -88,36 +88,20 @@ cc.Class({
},
},
onEnable
()
{
onEnable
()
{
this
.
rightNode
.
on
(
cc
.
Node
.
EventType
.
MOUSE_DOWN
,
this
.
changeIcon
.
bind
(
this
,
this
.
rightNode
,
true
))
this
.
rightNode
.
on
(
cc
.
Node
.
EventType
.
MOUSE_UP
,
this
.
changeIcon
.
bind
(
this
,
this
.
rightNode
,
false
))
this
.
rightNode
.
on
(
cc
.
Node
.
EventType
.
MOUSE_LEAVE
,
this
.
changeIcon
.
bind
(
this
,
this
.
rightNode
,
false
))
this
.
leftNode
.
on
(
cc
.
Node
.
EventType
.
MOUSE_DOWN
,
this
.
changeIcon
.
bind
(
this
,
this
.
leftNode
,
true
))
this
.
leftNode
.
on
(
cc
.
Node
.
EventType
.
MOUSE_UP
,
this
.
changeIcon
.
bind
(
this
,
this
.
leftNode
,
false
))
this
.
leftNode
.
on
(
cc
.
Node
.
EventType
.
MOUSE_UP
,
this
.
changeIcon
.
bind
(
this
,
this
.
leftNode
,
false
))
cc
.
systemEvent
.
on
(
'
playAudio
'
,
this
.
onPlayAudio
,
this
)
cc
.
systemEvent
.
on
(
'
playAudio
'
,
this
.
onPlayAudio
,
this
)
},
},
onDisable
()
{
onDisable
()
{
this
.
rightNode
.
off
(
cc
.
Node
.
EventType
.
MOUSE_DOWN
)
this
.
rightNode
.
off
(
cc
.
Node
.
EventType
.
MOUSE_UP
)
this
.
rightNode
.
off
(
cc
.
Node
.
EventType
.
MOUSE_LEAVE
)
this
.
leftNode
.
off
(
cc
.
Node
.
EventType
.
MOUSE_DOWN
)
this
.
leftNode
.
off
(
cc
.
Node
.
EventType
.
MOUSE_UP
)
this
.
leftNode
.
off
(
cc
.
Node
.
EventType
.
MOUSE_LEAVE
)
cc
.
systemEvent
.
off
(
'
playAudio
'
,
this
.
onPlayAudio
,
this
)
cc
.
systemEvent
.
off
(
'
playAudio
'
,
this
.
onPlayAudio
,
this
)
},
},
changeIcon
(
node
,
bl
)
{
node
.
children
[
0
].
active
=
!
bl
node
.
children
[
1
].
active
=
bl
},
getData
(
cb
)
{
getData
(
cb
)
{
cb
(
this
.
getDefaultData
());
cb
(
this
.
getDefaultData
());
},
},
getDefaultData
()
{
getDefaultData
()
{
const
dataJson
=
'
[{"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/
807e9f0c160545ec14d5094f258e0c75.png","rect":{"x":249,"y":0,"width":299,"height":299}},"hotZoneItemArr":[{"id":"1620701172440","index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/d8edc8d8113269b4c97b75a55a5c926c.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/bd0502e664d0d279ccbec4e22b60f051.mp3","itemType":"pic","fontScale":0.62265625,"imgScale":0.4671875,"mapScale":0.62265625,"gIdx":"1","rect":{"x":29.9,"y":29.9,"width":239.2,"height":239.2}}]},{"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/807e9f0c160545ec14d5094f258e0c75.png","rect":{"x":249,"y":0,"width":299,"height":299}},"hotZoneItemArr":[{"id":"1620701172440","index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/d8edc8d8113269b4c97b75a55a5c926c.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/bd0502e664d0d279ccbec4e22b60f051.mp3","itemType":"pic","fontScale":0.62265625,"imgScale":0.4671875,"mapScale":0.62265625,"gIdx":"1","rect":{"x":29.9,"y":29.9,"width":239.2,"height":239.
2}}]}]
'
const
dataJson
=
'
[{"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/
1a7513da33595f343fa73efa3be153d6.png","rect":{"x":231,"y":0,"width":287,"height":287}},"hotZoneItemArr":[{"id":"1620741734006","index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/e74a1c89473132b6ce53633fc53a6aee.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/c8a7dd49a778b0b6dd509aac0ef437ff.mp3","itemType":"pic","fontScale":0.58515625,"imgScale":0.12725,"mapScale":0.58515625,"gIdx":"1","rect":{"x":113.87,"y":112.33,"width":64.9,"height":86.02}}]},{"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/1a7513da33595f343fa73efa3be153d6.png","rect":{"x":231,"y":0,"width":287,"height":287}},"hotZoneItemArr":[{"id":"1620741734006","index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/e74a1c89473132b6ce53633fc53a6aee.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/c8a7dd49a778b0b6dd509aac0ef437ff.mp3","itemType":"pic","fontScale":0.58515625,"imgScale":0.12725,"mapScale":0.58515625,"gIdx":"1","rect":{"x":113.87,"y":112.33,"width":64.9,"height":86.0
2}}]}]
'
const
data
=
JSON
.
parse
(
dataJson
);
const
data
=
JSON
.
parse
(
dataJson
);
return
data
;
return
data
;
},
},
...
@@ -199,8 +183,6 @@ cc.Class({
...
@@ -199,8 +183,6 @@ cc.Class({
if
(
this
.
curPage
==
1
)
{
if
(
this
.
curPage
==
1
)
{
this
.
leftNode
.
active
=
true
this
.
leftNode
.
active
=
true
this
.
leftNode
.
children
[
0
].
active
=
true
this
.
leftNode
.
children
[
1
].
active
=
false
this
.
leftNode
.
scale
=
1
this
.
leftNode
.
scale
=
1
}
}
...
@@ -224,8 +206,6 @@ cc.Class({
...
@@ -224,8 +206,6 @@ cc.Class({
if
(
this
.
curPage
==
this
.
data
.
length
-
2
)
{
if
(
this
.
curPage
==
this
.
data
.
length
-
2
)
{
this
.
rightNode
.
active
=
true
this
.
rightNode
.
active
=
true
this
.
rightNode
.
children
[
0
].
active
=
true
this
.
rightNode
.
children
[
1
].
active
=
false
this
.
rightNode
.
scale
=
1
this
.
rightNode
.
scale
=
1
}
}
this
.
rightMove
()
this
.
rightMove
()
...
@@ -280,38 +260,18 @@ cc.Class({
...
@@ -280,38 +260,18 @@ cc.Class({
})
})
.
start
();
.
start
();
},
},
// update (dt) {},
stopAudio
(){
cc
.
systemEvent
.
emit
(
'
stopMusic
'
)
},
// ------------------------------------------------
// ------------------------------------------------
/**普通大小 */
originRect
:
null
,
/**设置显示区域内容 */
/**设置显示区域内容 */
setContent
(
picNode
,
data
)
{
setContent
(
picNode
,
data
)
{
if
(
!
data
)
{
if
(
!
data
)
{
console
.
log
(
'
数据错误
'
)
console
.
log
(
'
数据错误
'
)
return
return
}
}
picNode
picNode
.
getComponent
(
'
picNode
'
).
initWithData
(
data
)
let
sprite
=
picNode
.
getComponentInChildren
(
cc
.
Sprite
)
tools
.
getSpriteFrimeByUrl
(
data
.
bgItem
.
url
,
(
sp
)
=>
{
sprite
.
spriteFrame
=
sp
let
rect
=
sp
.
getRect
()
let
scale
=
rect
.
width
/
rect
.
height
let
originScale
=
this
.
originRect
.
width
/
this
.
originRect
.
height
if
(
scale
<
originScale
)
{
let
width
=
rect
.
width
/
(
rect
.
height
/
this
.
originRect
.
height
)
picNode
.
width
=
width
picNode
.
height
=
this
.
originRect
.
height
}
else
if
(
scale
>
originScale
)
{
picNode
.
height
=
rect
.
height
/
(
rect
.
width
/
this
.
originRect
.
width
)
picNode
.
width
=
this
.
originRect
.
width
}
else
{
picNode
.
width
=
this
.
originRect
.
width
picNode
.
height
=
this
.
originRect
.
height
}
console
.
log
(
picNode
)
})
}
}
// ------------------------------------------
// ------------------------------------------
...
...
play/assets/scene/sc
ript
/scene.js.meta
→
play/assets/scene/sc
ene
/scene.js.meta
View file @
5579fc40
File moved
play/assets/scene/script/NewScript.ts
View file @
5579fc40
...
@@ -23,19 +23,18 @@ export default class NewClass extends cc.Component {
...
@@ -23,19 +23,18 @@ export default class NewClass extends cc.Component {
start
()
{
start
()
{
cc
.
color
()
cc
.
color
()
this
.
node
.
off
(
cc
.
Node
.
EventType
.
MOUSE_DOWN
)
this
.
node
.
off
(
cc
.
Node
.
EventType
.
MOUSE_DOWN
)
cc
.
systemEvent
.
emit
(
'
stopMusic
'
)
}
}
// update (dt) {}
// update (dt) {}
onEnable
()
{
onEnable
()
{
let
one
=
new
cc
.
Animation
()
this
.
node
.
removeAllChildren
()
one
.
currentClip
.
speed
// let one = new cc.Node()
one
.
play
().
wrapMode
// one.removeFromParent()
one
.
defaultClip
.
wrapMode
=
cc
.
WrapMode
.
Reverse
// this.node
cc
.
Node
.
EventType
.
MOUSE_LEAVE
cc
.
tween
(
this
.
node
).
to
(
1
,{
opacity
:
1
}).
to
// cc.audioEngine.setFinishCallback()
cc
.
assetManager
.
loadRemote
this
.
node
.
}
}
...
...
play/assets/scene/script/tools.js
View file @
5579fc40
export
const
tools
=
{
const
tools
=
{
getSpriteFrimeByUrl
(
url
,
cb
)
{
getSpriteFrimeByUrl
(
url
,
cb
)
{
cc
.
loader
.
load
({
url
},
(
err
,
img
)
=>
{
cc
.
loader
.
load
({
url
},
(
err
,
img
)
=>
{
const
spriteFrame
=
new
cc
.
SpriteFrame
(
img
)
const
spriteFrame
=
new
cc
.
SpriteFrame
(
img
)
...
@@ -7,4 +7,6 @@ export const tools = {
...
@@ -7,4 +7,6 @@ export const tools = {
}
}
})
})
}
}
}
}
\ No newline at end of file
module
.
exports
=
tools
\ No newline at end of file
play/assets/scene/textures/bg_quan.png
0 → 100644
View file @
5579fc40
3.64 KB
play/assets/scene/textures/bg_quan.png.meta
0 → 100644
View file @
5579fc40
{
"ver": "2.3.5",
"uuid": "82ae3bc3-8bdf-463b-97d1-60ebd190bad2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 170,
"height": 100,
"platformSettings": {},
"subMetas": {
"bg_quan": {
"ver": "1.0.4",
"uuid": "9b336882-962e-447b-9d2c-89aca2bf95b4",
"rawTextureUuid": "82ae3bc3-8bdf-463b-97d1-60ebd190bad2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 170,
"height": 100,
"rawWidth": 170,
"rawHeight": 100,
"borderTop": 31,
"borderBottom": 31,
"borderLeft": 31,
"borderRight": 31,
"subMetas": {}
}
}
}
\ No newline at end of file
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