Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
Lwd
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
Lwd
Commits
8acdd228
Commit
8acdd228
authored
Mar 30, 2021
by
Lwd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aaaa
parent
e9e05281
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
11429 additions
and
907 deletions
+11429
-907
custom-hot-zone.component.html
...app/common/custom-hot-zone/custom-hot-zone.component.html
+61
-70
upload-dragon-bone.component.ts
...common/upload-dragon-bone/upload-dragon-bone.component.ts
+173
-173
form.component.html
form/src/app/form/form.component.html
+57
-2
form.component.ts
form/src/app/form/form.component.ts
+53
-4
yarn.lock
form/yarn.lock
+9829
-0
Comic Sans MS Bold.ttf
play/assets/tmpGame/fonts/Comic Sans MS Bold.ttf
+0
-0
Comic Sans MS Bold.ttf.meta
play/assets/tmpGame/fonts/Comic Sans MS Bold.ttf.meta
+5
-0
Game.fire
play/assets/tmpGame/scene/Game.fire
+896
-434
game.js
play/assets/tmpGame/script/game/game.js
+26
-2
item.js
play/assets/tmpGame/script/game/item.js
+134
-131
result.js
play/assets/tmpGame/script/game/result.js
+75
-7
data_mgr.js
play/assets/tmpGame/script/manager/data_mgr.js
+3
-1
res_mgr.js
play/assets/tmpGame/script/manager/res_mgr.js
+40
-6
snd_mgr.js
play/assets/tmpGame/script/manager/snd_mgr.js
+77
-77
No files found.
form/src/app/common/custom-hot-zone/custom-hot-zone.component.html
View file @
8acdd228
<div
class=
"p-image-children-editor"
>
<h5
style=
"margin-left: 2.5%;"
>
preview:
</h5>
<h5
style=
"margin-left: 2.5%;"
>
preview:
</h5>
<div
class=
"preview-box"
#
wrap
>
<canvas
id=
"canvas"
#
canvas
></canvas>
</div>
<div
class=
"preview-box"
#
wrap
>
<canvas
id=
"canvas"
#
canvas
></canvas>
</div>
<div
nz-row
nzType=
"flex"
nzAlign=
"middle"
>
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
>
<div
nz-row
nzType=
"flex"
nzAlign=
"middle"
>
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
>
<h5>
add background:
</h5>
<h5>
add background:
</h5>
<div
class=
"bg-box"
>
<app-upload-image-with-preview
[
picUrl
]="
bgItem
?.
url
"
(
imageUploaded
)="
onBackgroundUploadSuccess
($
event
)"
>
</app-upload-image-with-preview>
</div>
</div>
<div
class=
"bg-box"
>
<app-upload-image-with-preview
[
picUrl
]="
bgItem
?.
url
"
(
imageUploaded
)="
onBackgroundUploadSuccess
($
event
)"
>
</app-upload-image-with-preview>
</div>
</div>
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
class=
"img-box"
*
ngFor=
"let it of hotZoneArr; let i = index"
>
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
class=
"img-box"
*
ngFor=
"let it of hotZoneArr; let i = index"
>
<div
style=
"margin: auto; padding: 5px; margin-top: 30px; width:90%; border: 2px dashed #ddd; border-radius: 10px"
>
<span
style=
"margin-left: 40%;"
>
item-{{i + 1}}
</span>
<button
style=
"float: right;"
nz-button
nzType=
"danger"
nzSize=
"small"
(
click
)="
deleteBtnClick
(
i
)"
>
X
</button>
<div
style=
"margin: auto; padding: 5px; margin-top: 30px; width:90%; border: 2px dashed #ddd; border-radius: 10px"
>
<span
style=
"margin-left: 40%;"
>
item-{{i + 1}}
</span>
<button
style=
"float: right;"
nz-button
nzType=
"danger"
nzSize=
"small"
(
click
)="
deleteBtnClick
(
i
)"
>
X
</button>
<nz-divider
style=
"margin-top: 10px;"
></nz-divider>
<nz-divider
style=
"margin-top: 10px;"
></nz-divider>
<div
style=
"margin-top: -20px; margin-bottom: 5px"
>
<nz-radio-group
[
ngModel
]="
it
.
itemType
"
(
ngModelChange
)="
radioChange
($
event
,
it
)"
>
<label
*
ngIf=
"isHasRect"
nz-radio
nzValue=
"rect"
>
矩形
</label>
<label
*
ngIf=
"isHasPic"
nz-radio
nzValue=
"pic"
>
图片
</label>
<label
*
ngIf=
"isHasText"
nz-radio
nzValue=
"text"
>
文本
</label>
</nz-radio-group>
</div>
<div
style=
"margin-top: -20px; margin-bottom: 5px"
>
<nz-radio-group
[
ngModel
]="
it
.
itemType
"
(
ngModelChange
)="
radioChange
($
event
,
it
)"
>
<label
*
ngIf=
"isHasRect"
nz-radio
nzValue=
"rect"
>
矩形
</label>
<label
*
ngIf=
"isHasPic"
nz-radio
nzValue=
"pic"
>
图片
</label>
<label
*
ngIf=
"isHasText"
nz-radio
nzValue=
"text"
>
文本
</label>
</nz-radio-group>
</div>
<div
*
ngIf=
"it.itemType == 'pic'"
>
<app-upload-image-with-preview
[
picUrl
]="
it
?.
pic_url
"
(
imageUploaded
)="
onItemImgUploadSuccess
($
event
,
it
)"
>
</app-upload-image-with-preview>
</div>
<div
*
ngIf=
"it.itemType == 'pic'"
>
<app-upload-image-with-preview
[
picUrl
]="
it
?.
pic_url
"
(
imageUploaded
)="
onItemImgUploadSuccess
($
event
,
it
)"
>
</app-upload-image-with-preview>
</div>
<div
*
ngIf=
"it.itemType == 'text'"
>
<input
type=
"text"
nz-input
[(
ngModel
)]="
it
.
text
"
(
blur
)="
saveText
(
it
)"
>
</div>
<div
*
ngIf=
"it.itemType == 'text'"
>
<input
type=
"text"
nz-input
[(
ngModel
)]="
it
.
text
"
(
blur
)="
saveText
(
it
)"
>
</div>
<div
style=
"width: 100%; margin-top: 5px;"
>
<app-audio-recorder
[
audioUrl
]="
it
.
audio_url
"
(
audioUploaded
)="
onItemAudioUploadSuccess
($
event
,
it
)"
></app-audio-recorder>
</div>
<div
style=
"width: 100%; margin-top: 5px;"
>
<app-audio-recorder
[
audioUrl
]="
it
.
audio_url
"
(
audioUploaded
)="
onItemAudioUploadSuccess
($
event
,
it
)"
></app-audio-recorder>
</div>
</div>
</div>
</div>
</div>
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
>
<div
nz-col
nzSpan=
"5"
nzOffset=
"1"
>
<div
class=
"bg-box"
>
<button
nz-button
nzType=
"dashed"
(
click
)="
addBtnClick
()"
class=
"add-btn"
>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
<!--Add Image-->
Add hot zone
</button>
</div>
<div
class=
"bg-box"
>
<button
nz-button
nzType=
"dashed"
(
click
)="
addBtnClick
()"
class=
"add-btn"
>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
<!--Add Image-->
Add hot zone
</button>
</div>
</div>
</div>
</div>
</div>
<nz-divider></nz-divider>
<nz-divider></nz-divider>
<div
class=
"save-box"
>
<div
class=
"save-box"
>
<button
class=
"save-btn"
nz-button
nzType=
"primary"
[
nzSize
]="'
large
'"
nzShape=
"round"
(
click
)="
saveClick
()"
>
<i
nz-icon
nzType=
"save"
></i>
Save
</button>
<button
class=
"save-btn"
nz-button
nzType=
"primary"
[
nzSize
]="'
large
'"
nzShape=
"round"
(
click
)="
saveClick
()"
>
<i
nz-icon
nzType=
"save"
></i>
Save
</button>
</div>
</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>
\ No newline at end of file
form/src/app/common/upload-dragon-bone/upload-dragon-bone.component.ts
View file @
8acdd228
import
{
ApplicationRef
,
Component
,
EventEmitter
,
Input
,
OnChanges
,
OnDestroy
,
Output
}
from
'
@angular/core
'
;
import
{
ApplicationRef
,
Component
,
EventEmitter
,
Input
,
OnChanges
,
OnDestroy
,
Output
}
from
'
@angular/core
'
;
import
{
NzMessageService
,
UploadXHRArgs
,
UploadFile
}
from
'
ng-zorro-antd
'
;
@
Component
({
selector
:
'
app-upload-dragon-bone
'
,
templateUrl
:
'
./upload-dragon-bone.component.html
'
,
styleUrls
:
[
'
./upload-dragon-bone.component.scss
'
]
selector
:
'
app-upload-dragon-bone
'
,
templateUrl
:
'
./upload-dragon-bone.component.html
'
,
styleUrls
:
[
'
./upload-dragon-bone.component.scss
'
]
})
export
class
UploadDragonBoneComponent
implements
OnDestroy
,
OnChanges
{
uploading
=
false
;
progress
=
0
;
@
Input
()
btnName
=
'
配置龙骨动画
'
;
@
Input
()
animaNames
=
[];
@
Input
()
skeJsonData
=
{};
@
Input
()
texJsonData
=
{};
@
Input
()
texPngData
=
{};
@
Output
()
save
=
new
EventEmitter
();
@
Output
()
refreshEmitter
=
new
EventEmitter
();
// @Input()
// picUrl;
// @Input()
// canDelete = false;
// @Output()
// imageUploaded = new EventEmitter();
// @Output()
// imageUploadFailure = new EventEmitter();
// @Output()
// delete = new EventEmitter();
// @Input()
// picItem = null;
// @Input()
// iconSize = 2;
// @Input()
// TIP = 'Click here to upload image';
// @Input()
// disableUpload = false;
uploadUrl
;
uploadData
;
animaPanelVisible
=
false
;
isSkeJsonLoading
=
false
;
isTexJsonLoading
=
false
;
isTexPngLoading
=
false
;
constructor
(
private
appRef
:
ApplicationRef
,
private
nzMessageService
:
NzMessageService
)
{
this
.
uploadUrl
=
(
<
any
>
window
).
courseware
.
uploadUrl
();
this
.
uploadData
=
(
<
any
>
window
).
courseware
.
uploadData
();
window
[
'
air
'
].
getUploadCallback
=
(
url
,
data
)
=>
{
this
.
uploadUrl
=
url
;
this
.
uploadData
=
data
;
};
}
ngOnChanges
()
{
}
setAnimaBtnClick
()
{
this
.
animaPanelVisible
=
true
;
this
.
refresh
();
}
animaPanelCancel
()
{
this
.
animaPanelVisible
=
false
;
this
.
refresh
();
}
animaPanelOk
()
{
this
.
sendItemDragonBoneData
();
this
.
animaPanelVisible
=
false
;
this
.
refresh
();
}
sendItemDragonBoneData
()
{
const
data
=
{};
data
[
'
skeJsonData
'
]
=
this
.
skeJsonData
;
data
[
'
texJsonData
'
]
=
this
.
texJsonData
;
data
[
'
texPngData
'
]
=
this
.
texPngData
;
this
.
save
.
emit
(
data
);
}
skeJsonHandleChange
(
e
)
{
console
.
log
(
'
e:
'
,
e
);
switch
(
e
.
type
)
{
case
'
start
'
:
this
.
isSkeJsonLoading
=
true
;
break
;
case
'
success
'
:
this
.
skeJsonData
[
'
url
'
]
=
e
.
file
.
response
.
url
;
this
.
skeJsonData
[
'
name
'
]
=
e
.
file
.
name
;
this
.
nzMessageService
.
success
(
'
上传成功
'
);
this
.
isSkeJsonLoading
=
false
;
break
;
case
'
progress
'
:
break
;
}
}
texJsonHandleChange
(
e
)
{
console
.
log
(
'
e:
'
,
e
);
switch
(
e
.
type
)
{
case
'
start
'
:
this
.
isTexJsonLoading
=
true
;
break
;
case
'
success
'
:
this
.
texJsonData
[
'
url
'
]
=
e
.
file
.
response
.
url
;
this
.
texJsonData
[
'
name
'
]
=
e
.
file
.
name
;
this
.
nzMessageService
.
success
(
'
上传成功
'
);
this
.
isTexJsonLoading
=
false
;
break
;
case
'
progress
'
:
break
;
}
}
texPngHandleChange
(
e
)
{
console
.
log
(
'
e:
'
,
e
);
switch
(
e
.
type
)
{
case
'
start
'
:
this
.
isTexPngLoading
=
true
;
break
;
case
'
success
'
:
this
.
texPngData
[
'
url
'
]
=
e
.
file
.
response
.
url
;
this
.
texPngData
[
'
name
'
]
=
e
.
file
.
name
;
this
.
nzMessageService
.
success
(
'
上传成功
'
);
this
.
isTexPngLoading
=
false
;
break
;
case
'
progress
'
:
break
;
}
}
/**
* 刷新 渲染页面
*/
refresh
()
{
// this.refreshEmitter.emit();
setTimeout
(()
=>
{
this
.
appRef
.
tick
();
},
1
);
}
closePanel
()
{
console
.
log
(
'
in closePanel
'
);
this
.
refresh
();
}
ngOnDestroy
()
{
}
uploading
=
false
;
progress
=
0
;
@
Input
()
btnName
=
'
配置龙骨动画
'
;
@
Input
()
animaNames
=
[];
@
Input
()
skeJsonData
=
{};
@
Input
()
texJsonData
=
{};
@
Input
()
texPngData
=
{};
@
Output
()
save
=
new
EventEmitter
();
@
Output
()
refreshEmitter
=
new
EventEmitter
();
// @Input()
// picUrl;
// @Input()
// canDelete = false;
// @Output()
// imageUploaded = new EventEmitter();
// @Output()
// imageUploadFailure = new EventEmitter();
// @Output()
// delete = new EventEmitter();
// @Input()
// picItem = null;
// @Input()
// iconSize = 2;
// @Input()
// TIP = 'Click here to upload image';
// @Input()
// disableUpload = false;
uploadUrl
;
uploadData
;
animaPanelVisible
=
false
;
isSkeJsonLoading
=
false
;
isTexJsonLoading
=
false
;
isTexPngLoading
=
false
;
constructor
(
private
appRef
:
ApplicationRef
,
private
nzMessageService
:
NzMessageService
)
{
this
.
uploadUrl
=
(
<
any
>
window
).
courseware
.
uploadUrl
();
this
.
uploadData
=
(
<
any
>
window
).
courseware
.
uploadData
();
window
[
'
air
'
].
getUploadCallback
=
(
url
,
data
)
=>
{
this
.
uploadUrl
=
url
;
this
.
uploadData
=
data
;
};
}
ngOnChanges
()
{
}
setAnimaBtnClick
()
{
this
.
animaPanelVisible
=
true
;
this
.
refresh
();
}
animaPanelCancel
()
{
this
.
animaPanelVisible
=
false
;
this
.
refresh
();
}
animaPanelOk
()
{
this
.
sendItemDragonBoneData
();
this
.
animaPanelVisible
=
false
;
this
.
refresh
();
}
sendItemDragonBoneData
()
{
const
data
=
{};
data
[
'
skeJsonData
'
]
=
this
.
skeJsonData
;
data
[
'
texJsonData
'
]
=
this
.
texJsonData
;
data
[
'
texPngData
'
]
=
this
.
texPngData
;
this
.
save
.
emit
(
data
);
}
skeJsonHandleChange
(
e
)
{
console
.
log
(
'
e:
'
,
e
);
switch
(
e
.
type
)
{
case
'
start
'
:
this
.
isSkeJsonLoading
=
true
;
break
;
case
'
success
'
:
this
.
skeJsonData
[
'
url
'
]
=
e
.
file
.
response
.
url
;
this
.
skeJsonData
[
'
name
'
]
=
e
.
file
.
name
;
this
.
nzMessageService
.
success
(
'
上传成功
'
);
this
.
isSkeJsonLoading
=
false
;
break
;
case
'
progress
'
:
break
;
}
}
texJsonHandleChange
(
e
)
{
console
.
log
(
'
e:
'
,
e
);
switch
(
e
.
type
)
{
case
'
start
'
:
this
.
isTexJsonLoading
=
true
;
break
;
case
'
success
'
:
this
.
texJsonData
[
'
url
'
]
=
e
.
file
.
response
.
url
;
this
.
texJsonData
[
'
name
'
]
=
e
.
file
.
name
;
this
.
nzMessageService
.
success
(
'
上传成功
'
);
this
.
isTexJsonLoading
=
false
;
break
;
case
'
progress
'
:
break
;
}
}
texPngHandleChange
(
e
)
{
console
.
log
(
'
e:
'
,
e
);
switch
(
e
.
type
)
{
case
'
start
'
:
this
.
isTexPngLoading
=
true
;
break
;
case
'
success
'
:
this
.
texPngData
[
'
url
'
]
=
e
.
file
.
response
.
url
;
this
.
texPngData
[
'
name
'
]
=
e
.
file
.
name
;
this
.
nzMessageService
.
success
(
'
上传成功
'
);
this
.
isTexPngLoading
=
false
;
break
;
case
'
progress
'
:
break
;
}
}
/**
* 刷新 渲染页面
*/
refresh
()
{
// this.refreshEmitter.emit();
setTimeout
(()
=>
{
this
.
appRef
.
tick
();
},
1
);
}
closePanel
()
{
console
.
log
(
'
in closePanel
'
);
this
.
refresh
();
}
ngOnDestroy
()
{
}
}
form/src/app/form/form.component.html
View file @
8acdd228
...
...
@@ -4,6 +4,13 @@
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
contentObj
.
title
"
(
blur
)="
saveItem
()"
>
</div>
<div
class=
"section-content;text-align:center"
>
<div
style=
"display: inline-block; margin-bottom: 10px"
>
<app-audio-recorder
[
audioUrl
]="
item
.
contentObj
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
item
.
contentObj
)"
>
</app-audio-recorder>
</div>
</div>
<div
*
ngFor=
"let it of pageArr; let i = index"
style=
"padding: 0.5vw; width: 20%;"
>
<div
class=
"border"
style=
"display: flex; align-items: center;"
>
...
...
@@ -64,12 +71,60 @@
<!--公共部分-->
<div
class=
"item-box"
style=
"width: 35% ;padding-left: 100px"
>
<div
style=
"width: 100%;"
>
<app-upload-image-with-preview
style=
"width: 100%"
[
picUrl
]="
it
['
groupPic
']"
<div
style=
"float: left; text-align: right; margin-right: 10px; margin-left: 10px;"
>
<span>
显示选项
</span><span>
:
</span>
</div>
<div
style=
"float: left;width: 100%;"
>
<nz-radio-group
[(
ngModel
)]="
it
['
type
']"
(
ngModelChange
)="
handleQuestionTypeChange
($
event
)"
>
<label
nz-radio
[
nzValue
]="'
Image
'"
>
背景图片
</label>
<label
nz-radio
[
nzValue
]="'
Spine
'"
>
骨骼动画
</label>
</nz-radio-group>
</div>
<div
style=
"float: left;width: 100%;"
>
<div
*
ngIf=
"it['type']=='Image'"
>
<app-upload-image-with-preview
style=
"width: 100%;"
[
picUrl
]="
it
['
groupPic
']"
(
imageUploaded
)="
onImageUploadSuccessByItem
($
event
,
it
,
'
image_url
')"
>
</app-upload-image-with-preview>
</div>
<div
*
ngIf=
"it['type']=='Spine' "
>
<div
style=
"display: flex 1;margin-bottom: 10px;margin-left: 10px;"
>
<span>
上传 ske_json 文件
</span><span>
:
</span>
<nz-upload
nzAccept=
".json"
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
[
nzShowUploadList
]="
false
"
(
nzChange
)="
handleChange
($
event
,
it
,'
ske_json
')"
>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i>
Upload
</button>
</nz-upload>
<span
style=
"margin-left: 10px;"
>
{{it["ske_json_name"]}}
</span>
</div>
<div
style=
"display: flex 1;margin-bottom: 10px;margin-left: 10px;"
>
<span>
上传 tex_json 文件
</span><span>
:
</span>
<nz-upload
nzAccept=
".json"
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
[
nzShowUploadList
]="
false
"
(
nzChange
)="
handleChange
($
event
,
it
,'
tex_json
')"
>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i>
Upload
</button>
</nz-upload>
<span
style=
"margin-left: 10px;"
>
{{ it["tex_json_name"] }}
</span>
</div>
<div
style=
"display: flex 1;margin-bottom: 10px;margin-left: 10px;"
>
<span>
上传 tex_png 文件
</span><span>
:
</span>
<nz-upload
nzAccept=
".png"
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
[
nzShowUploadList
]="
false
"
(
nzChange
)="
handleChange
($
event
,
it
,'
tex_png
')"
>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i>
Upload
</button>
</nz-upload>
<span
style=
"margin-left: 10px;"
>
{{ it["tex_png_name"] }}
</span>
</div>
</div>
</div>
<!-- <app-upload-image-with-preview style="width: 100%" [picUrl]="it['groupPic']"
(imageUploaded)="onImageUploadSuccessByItem($event, it)">
</app-upload-image-with-preview>
</app-upload-image-with-preview>
-->
</div>
<input
style=
" width: 100%; margin-bottom: 0.5vw"
type=
"text"
nz-input
placeholder=
"点击输入文本内容"
[(
ngModel
)]="
it
.
groupLabel
"
(
blur
)="
saveItem
()"
>
<app-audio-recorder
style=
"margin-top: 0.5vw"
[
audioUrl
]="
it
['
group_audio_url
']"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
it
,
'
group
')"
>
</app-audio-recorder>
</div>
<div
class=
"item-box"
style=
"width:35%; padding-left: 100px"
>
...
...
form/src/app/form/form.component.ts
View file @
8acdd228
...
...
@@ -9,6 +9,7 @@ import {
ApplicationRef
,
ChangeDetectorRef
}
from
'
@angular/core
'
;
import
{
NzMessageService
,
UploadXHRArgs
,
UploadFile
}
from
'
ng-zorro-antd
'
;
...
...
@@ -19,6 +20,9 @@ import {
})
export
class
FormComponent
implements
OnInit
,
OnChanges
,
OnDestroy
{
pageArr
=
[];
//页数据
fileList
uploadUrl
uploadData
_item
:
any
;
KEY
=
'
hw_004
'
;
...
...
@@ -43,10 +47,13 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
update
=
new
EventEmitter
();
constructor
(
private
appRef
:
ApplicationRef
,
public
changeDetectorRef
:
ChangeDetectorRef
)
{
constructor
(
private
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
this
.
uploadUrl
=
(
<
any
>
window
).
courseware
.
uploadUrl
();
this
.
uploadData
=
(
<
any
>
window
).
courseware
.
uploadData
();
window
[
'
air
'
].
getUploadCallback
=
(
url
,
data
)
=>
{
this
.
uploadUrl
=
url
;
this
.
uploadData
=
data
;
};
}
...
...
@@ -55,6 +62,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
item
=
{};
this
.
item
.
contentObj
=
{};
const
getData
=
(
<
any
>
window
).
courseware
.
getData
;
getData
((
data
)
=>
{
...
...
@@ -99,6 +107,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
console
.
log
(
'
item:
'
,
this
.
item
);
}
getDefaultPicArr
()
{
const
arr
=
[];
// for (let i = 0; i < 4; i ++) {
...
...
@@ -170,6 +179,38 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
save
();
}
uploadSuccess
(
file
,
item
,
key
)
{
console
.
log
(
item
);
item
[
key
]
=
file
.
response
.
url
;
item
[
key
+
'
_name
'
]
=
file
.
name
;
this
.
save
();
}
handleChange
(
info
:
{
type
:
string
,
file
:
UploadFile
,
event
:
any
},
item
,
key
)
{
console
.
log
(
'
info:
'
,
info
);
switch
(
info
.
type
)
{
case
'
success
'
:
this
.
uploadSuccess
(
info
.
file
,
item
,
key
);
break
;
}
}
handleQuestionTypeChange
(
key
)
{
if
(
key
==
'
Spine
'
)
{
this
.
fileList
=
[
{
uid
:
'
-1
'
,
name
:
this
.
item
[
'
ske_json
'
],
status
:
'
done
'
,
url
:
this
.
item
[
'
ske_json
'
]
}
]
}
else
if
(
key
==
'
Image
'
)
{
}
this
.
saveItem
()
this
.
changeDetectorRef
.
detectChanges
();
this
.
changeDetectorRef
.
markForCheck
();
}
//添加页面
addPage
()
{
const
data
=
{
...
...
@@ -189,6 +230,13 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
b_audio_url
:
''
,
groupLabel
:
''
,
groupPic
:
''
,
group_audio_url
:
''
,
type
:
''
,
ske_json
:
''
,
tex_json
:
''
,
tex_png
:
''
,
// uploadData: '',
// uploadUrl: '',
};
this
.
pageArr
[
i
].
pageInfo
.
push
(
data
);
console
.
log
(
this
.
pageArr
);
...
...
@@ -222,6 +270,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
const
getData
=
(
<
any
>
window
).
courseware
.
getData
;
getData
((
data
)
=>
{
console
.
log
(
'
data:
'
,
data
);
// console.log('string:', JSON.stringify(data));
},
this
.
KEY
);
}
...
...
form/yarn.lock
0 → 100644
View file @
8acdd228
This source diff could not be displayed because it is too large. You can
view the blob
instead.
play/assets/tmpGame/fonts/Comic Sans MS Bold.ttf
0 → 100644
View file @
8acdd228
File added
play/assets/tmpGame/fonts/Comic Sans MS Bold.ttf.meta
0 → 100644
View file @
8acdd228
{
"ver": "1.1.0",
"uuid": "61fcc759-2eb5-4e50-a2f3-0cc3393881d8",
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/scene/Game.fire
View file @
8acdd228
...
...
@@ -75,37 +75,37 @@
"__id__": 5
},
{
"__id__": 2
5
"__id__": 2
7
},
{
"__id__":
68
"__id__":
29
},
{
"__id__": 7
0
"__id__": 7
2
},
{
"__id__": 7
3
"__id__": 7
5
},
{
"__id__": 1
2
6
"__id__": 1
3
6
},
{
"__id__": 1
4
4
"__id__": 1
5
4
}
],
"_active": true,
"_components": [
{
"__id__": 1
4
6
"__id__": 1
5
6
},
{
"__id__": 1
4
7
"__id__": 1
5
7
},
{
"__id__": 1
4
8
"__id__": 1
5
8
},
{
"__id__": 1
4
9
"__id__": 1
5
9
}
],
"_prefab": null,
...
...
@@ -195,7 +195,7 @@
"array": [
0,
0,
294.44863728670913
,
539.5252766428575
,
0,
0,
0,
...
...
@@ -271,9 +271,6 @@
{
"__id__": 11
},
{
"__id__": 17
},
{
"__id__": 19
},
...
...
@@ -282,6 +279,9 @@
},
{
"__id__": 23
},
{
"__id__": 25
}
],
"_active": true,
...
...
@@ -571,6 +571,9 @@
},
{
"__id__": 16
},
{
"__id__": 17
}
],
"_prefab": null,
...
...
@@ -798,6 +801,88 @@
"_originalHeight": 199,
"_id": "c2NzOuTThP4aFmEB/NOnR6"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 18
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_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": "6cg20v+bZMBqjVrbW/w80P"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "8b0b7lMf15OlIK40chbxp64",
"handler": "",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "spt_cloud1",
...
...
@@ -809,7 +894,7 @@
"_active": true,
"_components": [
{
"__id__":
18
"__id__":
20
}
],
"_prefab": null,
...
...
@@ -865,7 +950,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
7
"__id__": 1
9
},
"_enabled": true,
"_materials": [
...
...
@@ -903,7 +988,7 @@
"_active": true,
"_components": [
{
"__id__": 2
0
"__id__": 2
2
}
],
"_prefab": null,
...
...
@@ -959,7 +1044,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
19
"__id__":
21
},
"_enabled": true,
"_materials": [
...
...
@@ -997,7 +1082,7 @@
"_active": true,
"_components": [
{
"__id__": 2
2
"__id__": 2
4
}
],
"_prefab": null,
...
...
@@ -1053,7 +1138,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
1
"__id__": 2
3
},
"_enabled": true,
"_materials": [
...
...
@@ -1091,7 +1176,7 @@
"_active": true,
"_components": [
{
"__id__": 2
4
"__id__": 2
6
}
],
"_prefab": null,
...
...
@@ -1147,7 +1232,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
3
"__id__": 2
5
},
"_enabled": true,
"_materials": [
...
...
@@ -1174,6 +1259,101 @@
"_atlas": null,
"_id": "62jcSkj0xOKLOzg8dvUB8z"
},
{
"__type__": "cc.Node",
"_name": "draw",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 28
}
],
"_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": [
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": "10XJxX/MZD5risSrkeuYQs"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"_materials": [
{
"__uuid__": "a153945d-2511-4c14-be7b-05d242f47d57"
}
],
"_lineWidth": 2,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 251,
"g": 0,
"b": 0,
"a": 255
},
"_miterLimit": 10,
"_id": "9eUjS2d0VLlLGCSME0sqci"
},
{
"__type__": "cc.Node",
"_name": "game",
...
...
@@ -1183,16 +1363,16 @@
},
"_children": [
{
"__id__":
26
"__id__":
30
},
{
"__id__":
28
"__id__":
32
},
{
"__id__": 3
0
"__id__": 3
4
},
{
"__id__":
48
"__id__":
52
}
],
"_active": true,
...
...
@@ -1250,13 +1430,13 @@
"_name": "Layout",
"_objFlags": 0,
"_parent": {
"__id__": 2
5
"__id__": 2
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
27
"__id__":
31
}
],
"_prefab": null,
...
...
@@ -1312,7 +1492,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
26
"__id__":
30
},
"_enabled": true,
"_layoutSize": {
...
...
@@ -1344,13 +1524,13 @@
"_name": "Layout",
"_objFlags": 0,
"_parent": {
"__id__": 2
5
"__id__": 2
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
29
"__id__":
33
}
],
"_prefab": null,
...
...
@@ -1406,7 +1586,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
28
"__id__":
32
},
"_enabled": true,
"_layoutSize": {
...
...
@@ -1438,32 +1618,32 @@
"_name": "item_1",
"_objFlags": 0,
"_parent": {
"__id__": 2
5
"__id__": 2
9
},
"_children": [
{
"__id__": 31
},
{
"__id__": 33
"__id__": 35
},
{
"__id__": 37
},
{
"__id__":
39
"__id__":
41
},
{
"__id__": 43
},
{
"__id__": 47
}
],
"_active": false,
"_components": [
{
"__id__": 4
5
"__id__": 4
9
},
{
"__id__":
46
"__id__":
50
}
],
"_prefab": null,
...
...
@@ -1498,7 +1678,7 @@
1,
1,
1,
1
0
]
},
"_eulerAngles": {
...
...
@@ -1519,13 +1699,13 @@
"_name": "circle_1",
"_objFlags": 0,
"_parent": {
"__id__": 3
0
"__id__": 3
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
2
"__id__": 3
6
}
],
"_prefab": null,
...
...
@@ -1581,7 +1761,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
1
"__id__": 3
5
},
"_enabled": true,
"_materials": [
...
...
@@ -1613,17 +1793,17 @@
"_name": "circle_1_light",
"_objFlags": 0,
"_parent": {
"__id__": 3
0
"__id__": 3
4
},
"_children": [
{
"__id__": 3
4
"__id__": 3
8
}
],
"_active": false,
"_components": [
{
"__id__":
36
"__id__":
40
}
],
"_prefab": null,
...
...
@@ -1679,13 +1859,13 @@
"_name": "spt_chick",
"_objFlags": 0,
"_parent": {
"__id__": 3
3
"__id__": 3
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
5
"__id__": 3
9
}
],
"_prefab": null,
...
...
@@ -1705,14 +1885,14 @@
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y":
-0.3
"y":
0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-
8
5,
-
6
5,
0,
0,
0,
...
...
@@ -1741,7 +1921,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
4
"__id__": 3
8
},
"_enabled": true,
"_materials": [
...
...
@@ -1773,7 +1953,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
3
"__id__": 3
7
},
"_enabled": true,
"_materials": [
...
...
@@ -1805,13 +1985,13 @@
"_name": "spt_Star",
"_objFlags": 0,
"_parent": {
"__id__": 3
0
"__id__": 3
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
38
"__id__":
42
}
],
"_prefab": null,
...
...
@@ -1867,7 +2047,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
37
"__id__":
41
},
"_enabled": true,
"_materials": [
...
...
@@ -1899,17 +2079,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 3
0
"__id__": 3
4
},
"_children": [
{
"__id__": 4
0
"__id__": 4
4
}
],
"_active": false,
"_components": [
{
"__id__": 4
2
"__id__": 4
6
}
],
"_prefab": null,
...
...
@@ -1965,13 +2145,13 @@
"_name": "spt",
"_objFlags": 0,
"_parent": {
"__id__":
39
"__id__":
43
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
1
"__id__": 4
5
}
],
"_prefab": null,
...
...
@@ -2027,7 +2207,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
0
"__id__": 4
4
},
"_enabled": true,
"_materials": [
...
...
@@ -2059,7 +2239,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
39
"__id__":
43
},
"_enabled": true,
"_materials": [
...
...
@@ -2079,13 +2259,13 @@
"_name": "error",
"_objFlags": 0,
"_parent": {
"__id__": 3
0
"__id__": 3
4
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 4
4
"__id__": 4
8
}
],
"_prefab": null,
...
...
@@ -2141,7 +2321,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
3
"__id__": 4
7
},
"_enabled": true,
"_materials": [
...
...
@@ -2173,28 +2353,28 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
0
"__id__": 3
4
},
"_enabled": true,
"Picture": {
"__id__":
37
"__id__":
41
},
"nodeState": [
{
"__id__": 3
1
"__id__": 3
5
},
{
"__id__": 3
3
"__id__": 3
7
},
{
"__id__":
39
"__id__":
43
}
],
"spt_error": {
"__id__": 4
3
"__id__": 4
7
},
"spt_chick": {
"__id__": 3
4
"__id__": 3
8
},
"_id": "3bDAY1GxVPhaPpkEexe2pC"
},
...
...
@@ -2203,7 +2383,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
0
"__id__": 3
4
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -2212,7 +2392,7 @@
"zoomScale": 0.95,
"clickEvents": [
{
"__id__":
47
"__id__":
51
}
],
"_N$interactable": true,
...
...
@@ -2273,7 +2453,7 @@
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 3
0
"__id__": 3
4
},
"component": "",
"_componentId": "e729bOHnRpHpJ09B2/R3cNg",
...
...
@@ -2285,35 +2465,35 @@
"_name": "item_2",
"_objFlags": 0,
"_parent": {
"__id__": 2
5
"__id__": 2
9
},
"_children": [
{
"__id__": 49
},
{
"__id__": 51
"__id__": 53
},
{
"__id__": 5
3
"__id__": 5
5
},
{
"__id__": 57
},
{
"__id__":
59
"__id__":
61
},
{
"__id__": 63
},
{
"__id__": 67
}
],
"_active": false,
"_components": [
{
"__id__": 6
5
"__id__": 6
9
},
{
"__id__":
66
"__id__":
70
}
],
"_prefab": null,
...
...
@@ -2348,7 +2528,7 @@
1,
1,
1,
1
0
]
},
"_eulerAngles": {
...
...
@@ -2369,13 +2549,13 @@
"_name": "gun",
"_objFlags": 0,
"_parent": {
"__id__":
48
"__id__":
52
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
0
"__id__": 5
4
}
],
"_prefab": null,
...
...
@@ -2431,7 +2611,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
49
"__id__":
53
},
"_enabled": true,
"_materials": [
...
...
@@ -2463,13 +2643,13 @@
"_name": "circle_2",
"_objFlags": 0,
"_parent": {
"__id__":
48
"__id__":
52
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
2
"__id__": 5
6
}
],
"_prefab": null,
...
...
@@ -2525,7 +2705,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
1
"__id__": 5
5
},
"_enabled": true,
"_materials": [
...
...
@@ -2557,17 +2737,17 @@
"_name": "circle_2_light",
"_objFlags": 0,
"_parent": {
"__id__":
48
"__id__":
52
},
"_children": [
{
"__id__": 5
4
"__id__": 5
8
}
],
"_active": false,
"_components": [
{
"__id__":
56
"__id__":
60
}
],
"_prefab": null,
...
...
@@ -2623,13 +2803,13 @@
"_name": "spt_chick",
"_objFlags": 0,
"_parent": {
"__id__": 5
3
"__id__": 5
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
5
"__id__": 5
9
}
],
"_prefab": null,
...
...
@@ -2649,14 +2829,14 @@
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y":
1.3
"y":
0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
85
,
64
,
0,
0,
0,
...
...
@@ -2685,7 +2865,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
4
"__id__": 5
8
},
"_enabled": true,
"_materials": [
...
...
@@ -2717,7 +2897,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
3
"__id__": 5
7
},
"_enabled": true,
"_materials": [
...
...
@@ -2749,13 +2929,13 @@
"_name": "spt_Star",
"_objFlags": 0,
"_parent": {
"__id__":
48
"__id__":
52
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
58
"__id__":
62
}
],
"_prefab": null,
...
...
@@ -2811,7 +2991,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
57
"__id__":
61
},
"_enabled": true,
"_materials": [
...
...
@@ -2843,17 +3023,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__":
48
"__id__":
52
},
"_children": [
{
"__id__": 6
0
"__id__": 6
4
}
],
"_active": false,
"_components": [
{
"__id__": 6
2
"__id__": 6
6
}
],
"_prefab": null,
...
...
@@ -2909,13 +3089,13 @@
"_name": "spt",
"_objFlags": 0,
"_parent": {
"__id__":
59
"__id__":
63
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
1
"__id__": 6
5
}
],
"_prefab": null,
...
...
@@ -2971,7 +3151,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
0
"__id__": 6
4
},
"_enabled": true,
"_materials": [
...
...
@@ -3003,7 +3183,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
59
"__id__":
63
},
"_enabled": true,
"_materials": [
...
...
@@ -3023,13 +3203,13 @@
"_name": "error",
"_objFlags": 0,
"_parent": {
"__id__":
48
"__id__":
52
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 6
4
"__id__": 6
8
}
],
"_prefab": null,
...
...
@@ -3085,7 +3265,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
3
"__id__": 6
7
},
"_enabled": true,
"_materials": [
...
...
@@ -3117,28 +3297,28 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
48
"__id__":
52
},
"_enabled": true,
"Picture": {
"__id__":
57
"__id__":
61
},
"nodeState": [
{
"__id__": 5
1
"__id__": 5
5
},
{
"__id__": 5
3
"__id__": 5
7
},
{
"__id__":
59
"__id__":
63
}
],
"spt_error": {
"__id__": 6
3
"__id__": 6
7
},
"spt_chick": {
"__id__": 5
4
"__id__": 5
8
},
"_id": "8aq54xAINKpbcvXnQAf7Hy"
},
...
...
@@ -3147,7 +3327,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
48
"__id__":
52
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -3156,7 +3336,7 @@
"zoomScale": 0.95,
"clickEvents": [
{
"__id__":
67
"__id__":
71
}
],
"_N$interactable": true,
...
...
@@ -3217,108 +3397,13 @@
{
"__type__": "cc.ClickEvent",
"target": {
"__id__":
48
"__id__":
52
},
"component": "",
"_componentId": "e729bOHnRpHpJ09B2/R3cNg",
"handler": "onBtnGet",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "draw",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 69
}
],
"_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": [
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": "10XJxX/MZD5risSrkeuYQs"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 68
},
"_enabled": true,
"_materials": [
{
"__uuid__": "a153945d-2511-4c14-be7b-05d242f47d57"
}
],
"_lineWidth": 2,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 251,
"g": 0,
"b": 0,
"a": 255
},
"_miterLimit": 10,
"_id": "9eUjS2d0VLlLGCSME0sqci"
},
{
"__type__": "cc.Node",
"_name": "bg_grass",
...
...
@@ -3330,10 +3415,10 @@
"_active": true,
"_components": [
{
"__id__": 7
1
"__id__": 7
3
},
{
"__id__": 7
2
"__id__": 7
4
}
],
"_prefab": null,
...
...
@@ -3389,7 +3474,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
0
"__id__": 7
2
},
"_enabled": true,
"_materials": [
...
...
@@ -3421,7 +3506,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
0
"__id__": 7
2
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -3452,25 +3537,25 @@
},
"_children": [
{
"__id__": 7
4
"__id__": 7
6
},
{
"__id__": 7
7
"__id__": 7
9
},
{
"__id__":
85
"__id__":
91
},
{
"__id__":
8
9
"__id__":
9
9
},
{
"__id__":
9
3
"__id__":
10
3
}
],
"_active": false,
"_components": [
{
"__id__": 1
2
5
"__id__": 1
3
5
}
],
"_prefab": null,
...
...
@@ -3526,16 +3611,16 @@
"_name": "Mask",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
5
"__id__": 7
7
},
{
"__id__": 7
6
"__id__": 7
8
}
],
"_prefab": null,
...
...
@@ -3591,7 +3676,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
4
"__id__": 7
6
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -3659,7 +3744,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
4
"__id__": 7
6
},
"_enabled": true,
"_materials": [
...
...
@@ -3679,20 +3764,23 @@
"_name": "frame_3",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
5
},
"_children": [
{
"__id__":
78
"__id__":
80
},
{
"__id__": 80
"__id__": 82
},
{
"__id__": 86
}
],
"_active": true,
"_components": [
{
"__id__":
84
"__id__":
90
}
],
"_prefab": null,
...
...
@@ -3748,13 +3836,13 @@
"_name": "New Sprite",
"_objFlags": 0,
"_parent": {
"__id__": 7
7
"__id__": 7
9
},
"_children": [],
"_active": false,
"_components": [
{
"__id__":
79
"__id__":
81
}
],
"_prefab": null,
...
...
@@ -3810,7 +3898,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
78
"__id__":
80
},
"_enabled": true,
"_materials": [
...
...
@@ -3840,17 +3928,17 @@
"_name": "frame_2",
"_objFlags": 0,
"_parent": {
"__id__": 7
7
"__id__": 7
9
},
"_children": [
{
"__id__": 8
1
"__id__": 8
3
}
],
"_active": false,
"_components": [
{
"__id__": 8
3
"__id__": 8
5
}
],
"_prefab": null,
...
...
@@ -3906,13 +3994,13 @@
"_name": "lb_welldone",
"_objFlags": 0,
"_parent": {
"__id__": 8
0
"__id__": 8
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
2
"__id__": 8
4
}
],
"_prefab": null,
...
...
@@ -3968,7 +4056,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
1
"__id__": 8
3
},
"_enabled": true,
"_materials": [
...
...
@@ -4000,7 +4088,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
0
"__id__": 8
2
},
"_enabled": true,
"_materials": [
...
...
@@ -4028,23 +4116,206 @@
"_id": "59sbJPqMBECJUhfMebZmj6"
},
{
"__type__": "cc.
Sprit
e",
"_name": "",
"__type__": "cc.
Nod
e",
"_name": "
db
",
"_objFlags": 0,
"
node
": {
"__id__": 7
7
"
_parent
": {
"__id__": 7
9
},
"_enabled": true,
"_materials": [
"_children": [],
"_active": true,
"_components": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__id__": 87
},
{
"__id__": 88
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "96307e34-ecbc-416f-b297-e4e16393413e"
},
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 300,
"height": 300
},
"_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": "49RK/Nq9dENKjdPTKv0GYm"
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "",
"_animationName": "",
"_preCacheMode": -1,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": null,
"_N$dragonAtlasAsset": null,
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 0,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": "e9syqQtRlAI7YS64CcDVjt"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 89
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_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": "2c3iPY1tlNIa8BLbgN4EGD"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 75
},
"component": "",
"_componentId": "b01b30rB85Exb1aIQxobbR8",
"handler": "playSpine",
"customEventData": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 79
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "96307e34-ecbc-416f-b297-e4e16393413e"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
...
...
@@ -4064,17 +4335,17 @@
"_name": "farme_name",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
5
},
"_children": [
{
"__id__":
86
"__id__":
92
}
],
"_active": true,
"_components": [
{
"__id__":
8
8
"__id__":
9
8
}
],
"_prefab": null,
...
...
@@ -4125,18 +4396,87 @@
"groupIndex": 0,
"_id": "91jdQb6cVM4ZFUv8aM2crr"
},
{
"__type__": "cc.Node",
"_name": "Layout",
"_objFlags": 0,
"_parent": {
"__id__": 91
},
"_children": [
{
"__id__": 93
}
],
"_active": true,
"_components": [
{
"__id__": 97
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 360.57,
"height": 150
},
"_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": "c2FsO2o2hN0LOS5aPD6O9R"
},
{
"__type__": "cc.Node",
"_name": "lb_tip",
"_objFlags": 0,
"_parent": {
"__id__":
85
"__id__":
92
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 87
"__id__": 94
},
{
"__id__": 95
}
],
"_prefab": null,
...
...
@@ -4150,7 +4490,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 360.
03
,
"width": 360.
57
,
"height": 100.8
},
"_anchorPoint": {
...
...
@@ -4158,74 +4498,190 @@
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0.805,
0,
0,
0,
0,
1,
1,
1,
1
]
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0.805,
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": "a1brqGUARKxa5AIQENzGPX"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "She is clapping",
"_N$string": "She is clapping",
"_fontSize": 50,
"_lineHeight": 80,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "61fcc759-2eb5-4e50-a2f3-0cc3393881d8"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "微软雅黑",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "a4BUteUKxHFIGAM1jruKrQ"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 96
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_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
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a1brqGUARKxa5AIQENzGPX"
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "40wDNFc6BC0bxp306+Uoj7"
},
{
"__type__": "cc.Label",
"__type__": "cc.ClickEvent",
"target": {
"__id__": 75
},
"component": "",
"_componentId": "b01b30rB85Exb1aIQxobbR8",
"handler": "playAudio",
"customEventData": ""
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
86
"__id__":
92
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "She is clapping",
"_N$string": "She is clapping",
"_fontSize": 50,
"_lineHeight": 80,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "微软雅黑",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "a4BUteUKxHFIGAM1jruKrQ"
"_layoutSize": {
"__type__": "cc.Size",
"width": 360.57,
"height": 150
},
"_resize": 1,
"_N$layoutType": 1,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 0,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "b2qblV1lZHBrmG96obSFBt"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
85
"__id__":
91
},
"_enabled": true,
"_materials": [
...
...
@@ -4257,16 +4713,16 @@
"_name": "btn_close",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
9
0
"__id__":
10
0
},
{
"__id__":
9
1
"__id__":
10
1
}
],
"_prefab": null,
...
...
@@ -4322,7 +4778,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
8
9
"__id__":
9
9
},
"_enabled": true,
"_materials": [
...
...
@@ -4354,7 +4810,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
8
9
"__id__":
9
9
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4363,7 +4819,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__":
9
2
"__id__":
10
2
}
],
"_N$interactable": true,
...
...
@@ -4424,7 +4880,7 @@
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 7
3
"__id__": 7
5
},
"component": "",
"_componentId": "b01b30rB85Exb1aIQxobbR8",
...
...
@@ -4436,24 +4892,9 @@
"_name": "node_eff",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
5
},
"_children": [
{
"__id__": 94
},
{
"__id__": 96
},
{
"__id__": 98
},
{
"__id__": 100
},
{
"__id__": 102
},
{
"__id__": 104
},
...
...
@@ -4483,12 +4924,27 @@
},
{
"__id__": 122
},
{
"__id__": 124
},
{
"__id__": 126
},
{
"__id__": 128
},
{
"__id__": 130
},
{
"__id__": 132
}
],
"_active": false,
"_components": [
{
"__id__": 1
2
4
"__id__": 1
3
4
}
],
"_prefab": null,
...
...
@@ -4544,13 +5000,13 @@
"_name": "1",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
9
5
"__id__":
10
5
}
],
"_prefab": null,
...
...
@@ -4606,7 +5062,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
9
4
"__id__":
10
4
},
"_enabled": true,
"_materials": [
...
...
@@ -4638,13 +5094,13 @@
"_name": "2",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
9
7
"__id__":
10
7
}
],
"_prefab": null,
...
...
@@ -4700,7 +5156,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
9
6
"__id__":
10
6
},
"_enabled": true,
"_materials": [
...
...
@@ -4732,13 +5188,13 @@
"_name": "3",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
9
9
"__id__":
10
9
}
],
"_prefab": null,
...
...
@@ -4794,7 +5250,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
9
8
"__id__":
10
8
},
"_enabled": true,
"_materials": [
...
...
@@ -4826,13 +5282,13 @@
"_name": "4",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
0
1
"__id__": 1
1
1
}
],
"_prefab": null,
...
...
@@ -4888,7 +5344,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
0
0
"__id__": 1
1
0
},
"_enabled": true,
"_materials": [
...
...
@@ -4920,13 +5376,13 @@
"_name": "5",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
0
3
"__id__": 1
1
3
}
],
"_prefab": null,
...
...
@@ -4982,7 +5438,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
0
2
"__id__": 1
1
2
},
"_enabled": true,
"_materials": [
...
...
@@ -5014,13 +5470,13 @@
"_name": "6",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
0
5
"__id__": 1
1
5
}
],
"_prefab": null,
...
...
@@ -5076,7 +5532,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
0
4
"__id__": 1
1
4
},
"_enabled": true,
"_materials": [
...
...
@@ -5108,13 +5564,13 @@
"_name": "7",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
0
7
"__id__": 1
1
7
}
],
"_prefab": null,
...
...
@@ -5170,7 +5626,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
0
6
"__id__": 1
1
6
},
"_enabled": true,
"_materials": [
...
...
@@ -5202,13 +5658,13 @@
"_name": "8",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
0
9
"__id__": 1
1
9
}
],
"_prefab": null,
...
...
@@ -5264,7 +5720,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
0
8
"__id__": 1
1
8
},
"_enabled": true,
"_materials": [
...
...
@@ -5296,13 +5752,13 @@
"_name": "9",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
1
1
"__id__": 1
2
1
}
],
"_prefab": null,
...
...
@@ -5358,7 +5814,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
1
0
"__id__": 1
2
0
},
"_enabled": true,
"_materials": [
...
...
@@ -5390,13 +5846,13 @@
"_name": "10",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
1
3
"__id__": 1
2
3
}
],
"_prefab": null,
...
...
@@ -5452,7 +5908,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
1
2
"__id__": 1
2
2
},
"_enabled": true,
"_materials": [
...
...
@@ -5484,13 +5940,13 @@
"_name": "11",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
1
5
"__id__": 1
2
5
}
],
"_prefab": null,
...
...
@@ -5546,7 +6002,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
1
4
"__id__": 1
2
4
},
"_enabled": true,
"_materials": [
...
...
@@ -5578,13 +6034,13 @@
"_name": "12",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
1
7
"__id__": 1
2
7
}
],
"_prefab": null,
...
...
@@ -5640,7 +6096,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
1
6
"__id__": 1
2
6
},
"_enabled": true,
"_materials": [
...
...
@@ -5672,13 +6128,13 @@
"_name": "13",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
1
9
"__id__": 1
2
9
}
],
"_prefab": null,
...
...
@@ -5734,7 +6190,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
1
8
"__id__": 1
2
8
},
"_enabled": true,
"_materials": [
...
...
@@ -5766,13 +6222,13 @@
"_name": "14",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
2
1
"__id__": 1
3
1
}
],
"_prefab": null,
...
...
@@ -5828,7 +6284,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
0
"__id__": 1
3
0
},
"_enabled": true,
"_materials": [
...
...
@@ -5860,13 +6316,13 @@
"_name": "15",
"_objFlags": 0,
"_parent": {
"__id__":
9
3
"__id__":
10
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
2
3
"__id__": 1
3
3
}
],
"_prefab": null,
...
...
@@ -5922,7 +6378,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
2
"__id__": 1
3
2
},
"_enabled": true,
"_materials": [
...
...
@@ -5954,7 +6410,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
9
3
"__id__":
10
3
},
"_enabled": true,
"_defaultClip": {
...
...
@@ -5973,23 +6429,29 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
3
"__id__": 7
5
},
"_enabled": true,
"Picture": {
"__id__":
78
"__id__":
80
},
"wellDone": {
"__id__": 8
0
"__id__": 8
2
},
"frame_tips": {
"__id__":
85
"__id__":
91
},
"lb_tips": {
"__id__":
87
"__id__":
94
},
"eff_sahua": {
"__id__": 124
"__id__": 134
},
"Armature": {
"__id__": 87
},
"layoutText": {
"__id__": 92
},
"_id": "aanl6eAfxD/IRkmdVyvj7C"
},
...
...
@@ -6002,22 +6464,22 @@
},
"_children": [
{
"__id__": 1
2
7
"__id__": 1
3
7
},
{
"__id__": 1
3
1
"__id__": 1
4
1
},
{
"__id__": 1
3
5
"__id__": 1
4
5
},
{
"__id__": 1
3
9
"__id__": 1
4
9
}
],
"_active": true,
"_components": [
{
"__id__": 1
4
3
"__id__": 1
5
3
}
],
"_prefab": null,
...
...
@@ -6073,16 +6535,16 @@
"_name": "btn_left",
"_objFlags": 0,
"_parent": {
"__id__": 1
2
6
"__id__": 1
3
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
2
8
"__id__": 1
3
8
},
{
"__id__": 1
2
9
"__id__": 1
3
9
}
],
"_prefab": null,
...
...
@@ -6138,7 +6600,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
7
"__id__": 1
3
7
},
"_enabled": true,
"_materials": [
...
...
@@ -6170,7 +6632,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
7
"__id__": 1
3
7
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -6179,7 +6641,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 1
3
0
"__id__": 1
4
0
}
],
"_N$interactable": true,
...
...
@@ -6252,16 +6714,16 @@
"_name": "btn_start",
"_objFlags": 0,
"_parent": {
"__id__": 1
2
6
"__id__": 1
3
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
3
2
"__id__": 1
4
2
},
{
"__id__": 1
3
3
"__id__": 1
4
3
}
],
"_prefab": null,
...
...
@@ -6317,7 +6779,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
3
1
"__id__": 1
4
1
},
"_enabled": true,
"_materials": [
...
...
@@ -6349,7 +6811,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
3
1
"__id__": 1
4
1
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -6358,7 +6820,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 1
3
4
"__id__": 1
4
4
}
],
"_N$interactable": true,
...
...
@@ -6431,16 +6893,16 @@
"_name": "btn_right",
"_objFlags": 0,
"_parent": {
"__id__": 1
2
6
"__id__": 1
3
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
3
6
"__id__": 1
4
6
},
{
"__id__": 1
3
7
"__id__": 1
4
7
}
],
"_prefab": null,
...
...
@@ -6496,7 +6958,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
3
5
"__id__": 1
4
5
},
"_enabled": true,
"_materials": [
...
...
@@ -6528,7 +6990,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
3
5
"__id__": 1
4
5
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -6537,7 +6999,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 1
3
8
"__id__": 1
4
8
}
],
"_N$interactable": true,
...
...
@@ -6610,16 +7072,16 @@
"_name": "btn_sound",
"_objFlags": 0,
"_parent": {
"__id__": 1
2
6
"__id__": 1
3
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
4
0
"__id__": 1
5
0
},
{
"__id__": 1
4
1
"__id__": 1
5
1
}
],
"_prefab": null,
...
...
@@ -6675,7 +7137,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
3
9
"__id__": 1
4
9
},
"_enabled": true,
"_materials": [
...
...
@@ -6707,7 +7169,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
3
9
"__id__": 1
4
9
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -6716,7 +7178,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 1
4
2
"__id__": 1
5
2
}
],
"_N$interactable": true,
...
...
@@ -6789,7 +7251,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
6
"__id__": 1
3
6
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -6822,7 +7284,7 @@
"_active": true,
"_components": [
{
"__id__": 1
4
5
"__id__": 1
5
5
}
],
"_prefab": null,
...
...
@@ -6878,7 +7340,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
4
4
"__id__": 1
5
4
},
"_enabled": true,
"eff_btn": {
...
...
@@ -6954,22 +7416,22 @@
},
"_enabled": true,
"contentArr_1": {
"__id__":
26
"__id__":
30
},
"Item_1": {
"__id__": 3
0
"__id__": 3
4
},
"contentArr_2": {
"__id__":
28
"__id__":
32
},
"Item_2": {
"__id__":
48
"__id__":
52
},
"draw": {
"__id__":
69
"__id__":
28
},
"resultNode": {
"__id__": 7
3
"__id__": 7
5
},
"title": {
"__id__": 13
...
...
@@ -6987,7 +7449,7 @@
"UIMax": [],
"topUI": [],
"canvasView": {
"__id__": 1
4
6
"__id__": 1
5
6
},
"isCanvas": true,
"_id": "5eOVDDzARGnoMLcNXyk5ml"
...
...
play/assets/tmpGame/script/game/game.js
View file @
8acdd228
...
...
@@ -114,6 +114,13 @@ var game = cc.Class({
}
this
.
resultNode
.
active
=
false
;
//重置游戏数据游戏数据
g
.
data_mgr
.
resGameData
();
g
.
data_mgr
.
addPreloadImage
();
g
.
data_mgr
.
addPreloadAudio
();
g
.
data_mgr
.
addPreloadAnima
();
//初始化界面
this
.
UpdataUi
();
...
...
@@ -123,6 +130,8 @@ var game = cc.Class({
//游戏开始
g
.
game
.
inst
.
gameStart
();
//清除线
this
.
clearLine
();
},
...
...
@@ -162,6 +171,15 @@ var game = cc.Class({
});
},
//播放标题音效
playAudioTitle
:
function
()
{
//获得播放路径
var
path
=
g
.
data_mgr
.
data
.
contentObj
.
audio_url
;
g
.
res_mgr
.
playAudioByUrl
(
path
,
(
url
)
=>
{
g
.
snd_mgr
.
playEffect
(
url
);
});
},
//添加项
addItem
:
function
(
listInfo
,
content
,
item
,
i
)
{
if
(
listInfo
.
length
<=
i
)
{
...
...
@@ -190,7 +208,12 @@ var game = cc.Class({
for
(
var
i
=
0
;
i
<
conten
.
childrenCount
;
i
++
)
{
var
item
=
conten
.
children
[
i
]
if
(
item
.
state
==
1
||
item
.
state
==
3
)
{
// if (state == 2) {
var
com
=
item
.
getComponent
(
"
item
"
);
//设置状态为可答题
com
.
setBtnState
(
item
.
state
);
continue
;
// }
}
else
{
var
com
=
item
.
getComponent
(
"
item
"
);
//设置状态为可答题
...
...
@@ -199,7 +222,7 @@ var game = cc.Class({
}
},
ShowLine
:
function
(
sx
,
sy
,
ex
,
ey
)
{
ShowLine
:
function
(
sx
,
sy
,
ex
,
ey
,
cb
)
{
var
b
=
0
;
var
a
=
0
;
var
k
=
ex
==
sx
?
0
:
(
ey
-
sy
)
/
(
ex
-
sx
);
...
...
@@ -220,7 +243,7 @@ var game = cc.Class({
if
(
difnode
)
{
this
.
scheduleOnce
(
function
()
{
this
.
DrawLine
(
sx
,
sy
,
difx
,
dify
);
this
.
ShowLine
(
difx
,
dify
,
ex
,
ey
);
this
.
ShowLine
(
difx
,
dify
,
ex
,
ey
,
cb
);
}.
bind
(
this
),
0.01
);
}
else
{
...
...
@@ -232,6 +255,7 @@ var game = cc.Class({
//显示弹窗
var
Info
=
g
.
data_mgr
.
getResultInfo
(
g
.
data_mgr
.
nowNode
.
typeId
);
g
.
game
.
inst
.
showResult
(
Info
);
cb
&&
cb
();
}
},
...
...
play/assets/tmpGame/script/game/item.js
View file @
8acdd228
...
...
@@ -2,144 +2,147 @@
* item
*/
cc
.
Class
({
extends
:
cc
.
Component
,
extends
:
cc
.
Component
,
properties
:
{
Picture
:
{
default
:
null
,
type
:
cc
.
Node
,
displayName
:
"
图片
"
},
nodeState
:
{
default
:
[],
type
:
cc
.
Node
,
displayName
:
"
节点状态
"
},
spt_error
:
{
default
:
null
,
type
:
cc
.
Node
,
displayName
:
"
失败
"
},
spt_chick
:
{
default
:
null
,
type
:
cc
.
Node
,
displayName
:
"
小鸡
"
}
},
properties
:
{
Picture
:
{
default
:
null
,
type
:
cc
.
Node
,
displayName
:
"
图片
"
},
nodeState
:
{
default
:
[],
type
:
cc
.
Node
,
displayName
:
"
节点状态
"
},
spt_error
:
{
default
:
null
,
type
:
cc
.
Node
,
displayName
:
"
失败
"
},
spt_chick
:
{
default
:
null
,
type
:
cc
.
Node
,
displayName
:
"
小鸡
"
}
},
//更新界面ui
updateUI
:
function
(
Info
)
{
//当前数据
this
.
itemInfo
=
Info
;
//初始化数据
this
.
InitData
();
//设置图片
this
.
setPicture
(
Info
.
url
);
},
//更新界面ui
updateUI
:
function
(
Info
)
{
//当前数据
this
.
itemInfo
=
Info
;
//初始化数据
this
.
InitData
();
//设置图片
this
.
setPicture
(
Info
.
url
);
},
//初始化信息
InitData
:
function
()
{
//设置按钮状态
this
.
setBtnState
(
0
);
if
(
this
.
itemInfo
.
positionId
==
2
)
{
this
.
setBtnState
(
2
);
}
},
//初始化信息
InitData
:
function
()
{
//设置按钮状态
this
.
setBtnState
(
0
);
if
(
this
.
itemInfo
.
positionId
==
2
)
{
this
.
setBtnState
(
2
);
}
},
//设置图片
setPicture
:
function
(
url
)
{
//图片资源
g
.
res_mgr
.
getSpriteFrimeByUrl
(
url
,
function
(
list
)
{
this
.
Picture
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
list
;
this
.
Picture
.
active
=
true
;
}.
bind
(
this
));
},
//设置图片
setPicture
:
function
(
url
)
{
//图片资源
g
.
res_mgr
.
getSpriteFrimeByUrl
(
url
,
function
(
list
)
{
this
.
Picture
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
list
;
this
.
Picture
.
active
=
true
;
}.
bind
(
this
));
},
//设置按钮状态
setBtnOpen
:
function
(
b
)
{
this
.
node
.
getComponent
(
cc
.
Button
).
enabled
=
b
;
},
//设置按钮状态
setBtnOpen
:
function
(
b
)
{
this
.
node
.
getComponent
(
cc
.
Button
).
enabled
=
b
;
},
//设置按钮状态0可点击 1已答对 2答错 3连线完成
setBtnState
:
function
(
num
)
{
this
.
nodeState
[
num
].
active
=
true
;
switch
(
~~
num
)
{
case
0
:
this
.
nodeState
[
0
].
active
=
true
;
this
.
nodeState
[
1
].
active
=
false
;
this
.
nodeState
[
2
].
active
=
false
;
this
.
node
.
state
=
0
;
this
.
setBtnOpen
(
true
);
break
;
case
1
:
this
.
nodeState
[
1
].
active
=
true
;
this
.
nodeState
[
2
].
active
=
false
;
this
.
node
.
state
=
1
;
this
.
setBtnOpen
(
false
);
break
;
case
2
:
this
.
nodeState
[
1
].
active
=
false
;
this
.
nodeState
[
2
].
active
=
true
;
this
.
node
.
state
=
2
;
this
.
setBtnOpen
(
false
);
break
;
case
3
:
this
.
nodeState
[
0
].
active
=
true
;
this
.
nodeState
[
1
].
active
=
false
;
this
.
nodeState
[
2
].
active
=
false
;
this
.
node
.
state
=
3
;
this
.
setBtnOpen
(
false
);
break
;
}
},
//
onBtnGet
:
function
()
{
//如果节点的Id等于当前数据的id的话
if
(
this
.
itemInfo
.
typeId
==
g
.
data_mgr
.
playId
&&
this
.
itemInfo
.
positionId
==
g
.
data_mgr
.
playType
)
{
//播放答对音效
g
.
speaker
.
inst
.
play_good
();
this
.
setBtnState
(
1
);
//如果是上面答对的话
if
(
this
.
itemInfo
.
positionId
==
1
)
{
//执行播放下排的音乐
g
.
data_mgr
.
playType
=
2
;
g
.
game
.
inst
.
PlayAudio
();
//设置按钮状态0可点击 1已答对 2答错 3连线完成
setBtnState
:
function
(
num
)
{
//
this.nodeState[num].active = true;
switch
(
~~
num
)
{
case
0
:
this
.
nodeState
[
0
].
active
=
true
;
this
.
nodeState
[
1
].
active
=
false
;
this
.
nodeState
[
2
].
active
=
false
;
this
.
node
.
state
=
0
;
this
.
setBtnOpen
(
true
);
break
;
case
1
:
this
.
nodeState
[
1
].
active
=
true
;
this
.
nodeState
[
2
].
active
=
false
;
this
.
node
.
state
=
1
;
this
.
setBtnOpen
(
false
);
break
;
case
2
:
this
.
nodeState
[
1
].
active
=
false
;
this
.
nodeState
[
2
].
active
=
true
;
this
.
node
.
state
=
2
;
this
.
setBtnOpen
(
false
);
break
;
case
3
:
this
.
nodeState
[
0
].
active
=
true
;
this
.
nodeState
[
1
].
active
=
false
;
this
.
nodeState
[
2
].
active
=
false
;
this
.
node
.
state
=
3
;
this
.
setBtnOpen
(
false
);
break
;
}
},
//
onBtnGet
:
function
()
{
//如果节点的Id等于当前数据的id的话
if
(
this
.
itemInfo
.
typeId
==
g
.
data_mgr
.
playId
&&
this
.
itemInfo
.
positionId
==
g
.
data_mgr
.
playType
)
{
//播放答对音效
g
.
speaker
.
inst
.
play_good
();
this
.
setBtnState
(
1
);
//如果是上面答对的话
if
(
this
.
itemInfo
.
positionId
==
1
)
{
//执行播放下排的音乐
g
.
data_mgr
.
playType
=
2
;
g
.
game
.
inst
.
PlayAudio
();
//设置状态
g
.
game
.
inst
.
allLightDark
(
1
,
2
);
g
.
game
.
inst
.
allLightDark
(
2
,
0
);
//设置状态
g
.
game
.
inst
.
allLightDark
(
1
,
2
);
g
.
game
.
inst
.
allLightDark
(
2
,
0
);
//把这个答对的节点保存起来
g
.
data_mgr
.
itemInfo
=
this
.
spt_chick
;
}
//如果答对的是下排的话
if
(
this
.
itemInfo
.
positionId
==
2
)
{
//连线
var
posStart
=
g
.
data_mgr
.
itemInfo
.
parent
.
convertToWorldSpaceAR
(
g
.
data_mgr
.
itemInfo
.
position
);
var
posEnd
=
this
.
spt_chick
.
parent
.
convertToWorldSpaceAR
(
this
.
spt_chick
.
position
);
g
.
data_mgr
.
nowNode
=
this
.
itemInfo
;
g
.
game
.
inst
.
ShowLine
(
posStart
.
x
-
640
,
posStart
.
y
-
360
,
posEnd
.
x
-
640
,
posEnd
.
y
-
360
);
// //显示弹窗
// var Info = g.data_mgr.getResultInfo(this.itemInfo.typeId);
// g.game.inst.showResult(Info);
//把这个答对的节点保存起来
g
.
data_mgr
.
itemInfo
=
this
;
}
//如果答对的是下排的话
if
(
this
.
itemInfo
.
positionId
==
2
)
{
//连线
var
posStart
=
g
.
data_mgr
.
itemInfo
.
spt_chick
.
parent
.
convertToWorldSpaceAR
(
g
.
data_mgr
.
itemInfo
.
spt_chick
.
position
);
var
posEnd
=
this
.
spt_chick
.
parent
.
convertToWorldSpaceAR
(
this
.
spt_chick
.
position
);
g
.
data_mgr
.
nowNode
=
this
.
itemInfo
;
g
.
game
.
inst
.
ShowLine
(
posStart
.
x
-
640
,
posStart
.
y
-
360
,
posEnd
.
x
-
640
,
posEnd
.
y
-
360
,
()
=>
{
g
.
data_mgr
.
itemInfo
.
setBtnState
(
3
);
this
.
setBtnState
(
3
);
});
// //显示弹窗
// var Info = g.data_mgr.getResultInfo(this.itemInfo.typeId);
// g.game.inst.showResult(Info);
//弹窗关闭
// //移除当前播放的音乐
// const index = this.pageArr.indexOf(data);
// if (index !== -1) {
// this.pageArr.splice(index, 1);
// }
}
}
else
{
this
.
spt_error
.
active
=
true
;
//播放失败音效
g
.
speaker
.
inst
.
play_error
();
this
.
setBtnState
(
2
);
cc
.
tween
(
this
.
spt_error
)
.
to
(
0.2
,
{
scale
:
1.1
})
.
to
(
0.5
,
{
scale
:
0
})
.
start
()
}
},
//弹窗关闭
// //移除当前播放的音乐
// const index = this.pageArr.indexOf(data);
// if (index !== -1) {
// this.pageArr.splice(index, 1);
// }
}
}
else
{
this
.
spt_error
.
active
=
true
;
//播放失败音效
g
.
speaker
.
inst
.
play_error
();
this
.
setBtnState
(
2
);
cc
.
tween
(
this
.
spt_error
)
.
to
(
0.2
,
{
scale
:
1.1
})
.
to
(
0.5
,
{
scale
:
0
})
.
start
()
}
},
});
play/assets/tmpGame/script/game/result.js
View file @
8acdd228
/**
* result
*/
const
Color_texts
=
[
'
#BE1AC1
'
,
'
#24C11A
'
,
'
#1A1DC1
'
,
'
#9F5307
'
];
var
result
=
cc
.
Class
({
extends
:
cc
.
Component
,
...
...
@@ -29,6 +31,16 @@ var result = cc.Class({
default
:
null
,
type
:
cc
.
Animation
,
displayName
:
"
撒花特效
"
},
Armature
:
{
default
:
null
,
type
:
dragonBones
.
ArmatureDisplay
,
displayName
:
"
动画
"
},
layoutText
:
{
default
:
null
,
type
:
cc
.
Node
,
displayName
:
"
文字布局
"
}
},
...
...
@@ -39,13 +51,24 @@ var result = cc.Class({
//更新界面ui
updateUI
:
function
(
Info
)
{
this
.
Picture
.
active
=
false
;
this
.
Armature
.
node
.
active
=
false
;
if
(
Info
)
{
//当前数据
this
.
itemInfo
=
Info
;
//设置图片
this
.
setPicture
(
Info
.
groupPic
);
//设置图片
this
.
setTips
(
Info
.
groupLabel
);
//显示图片
if
(
Info
.
type
==
"
Image
"
)
{
//设置图片
this
.
setPicture
(
Info
.
groupPic
);
}
//显示骨骼动画
if
(
Info
.
type
==
"
Spine
"
)
{
g
.
res_mgr
.
loadSpine
(
this
.
Armature
,
Info
);
}
this
.
initRichText
(
Info
.
groupLabel
);
this
.
wellDone
.
active
=
false
;
this
.
frame_tips
.
active
=
true
;
this
.
eff_sahua
.
node
.
active
=
false
;
...
...
@@ -61,9 +84,9 @@ var result = cc.Class({
}
},
//
设置标签
setTips
:
function
(
num
)
{
this
.
lb_tips
.
string
=
num
;
//
初始化文本
initRichText
(
text
)
{
this
.
lb_tips
.
string
=
text
;
},
//设置图片
...
...
@@ -75,6 +98,51 @@ var result = cc.Class({
}.
bind
(
this
));
},
//播放龙骨动画
playSpine
()
{
this
.
Armature
.
playAnimation
(
g
.
data_mgr
.
dragonName
,
1
);
},
stopSpine
()
{
this
.
Armature
.
dragonAtlasAsset
=
null
;
this
.
Armature
.
dragonAsset
=
null
;
this
.
Armature
.
armatureName
=
''
;
this
.
scheduleOnce
(()
=>
{
g
.
res_mgr
.
loadSpine
(
this
.
Armature
,
this
.
Info
);
})
},
playAudio
()
{
cc
.
assetManager
.
loadRemote
(
this
.
itemInfo
.
group_audio_url
,
null
,
(
err
,
clip
)
=>
{
this
.
audioID
=
cc
.
audioEngine
.
play
(
clip
,
false
,
1
);
this
.
audioDuration
=
cc
.
audioEngine
.
getDuration
(
this
.
audioID
);
this
.
textDuration
=
this
.
audioDuration
/
this
.
layoutText
.
childrenCount
;
this
.
textIndex
=
0
;
this
.
schedule
(
this
.
chengeTextColor
,
this
.
textDuration
,
this
.
layoutText
.
childrenCount
,
0.01
)
});
},
stopAudio
()
{
cc
.
audioEngine
.
stop
(
this
.
audioID
);
this
.
unschedule
(
this
.
chengeTextColor
);
this
.
isPlaying
=
false
;
this
.
stopSpine
();
},
chengeTextColor
()
{
if
(
!
this
.
layoutText
.
children
[
this
.
textIndex
]
||
this
.
textIndex
==
this
.
layoutText
.
childrenCount
)
{
this
.
isPlaying
=
false
;
this
.
unschedule
(
this
.
chengeTextColor
);
}
this
.
layoutText
.
children
[
this
.
textIndex
]
&&
(
this
.
layoutText
.
children
[
this
.
textIndex
].
color
=
new
cc
.
Color
().
fromHEX
(
Color_texts
[
3
]));
this
.
layoutText
.
children
[
this
.
textIndex
-
1
]
&&
(
this
.
layoutText
.
children
[
this
.
textIndex
-
1
].
color
=
new
cc
.
Color
().
fromHEX
(
Color_texts
[
3
]));
this
.
textIndex
++
;
},
clearTextColor
()
{
for
(
let
i
=
0
;
i
<
this
.
layoutText
.
children
.
length
;
i
++
)
{
this
.
layoutText
.
children
[
i
].
color
=
new
cc
.
Color
().
fromHEX
(
Color_texts
[
3
]);
}
},
//点击关闭
onBtnClose
:
function
()
{
this
.
node
.
active
=
false
;
...
...
play/assets/tmpGame/script/manager/data_mgr.js
View file @
8acdd228
...
...
@@ -13,6 +13,7 @@ g.data_mgr = {
data
:
null
,
//表所有数据
pageId
:
0
,
//页id
dragonName
:
null
,
//龙骨动画名字
lineColor
:
[
'
#FF0000
'
,
'
#FF7F00
'
,
'
#FFFF00
'
,
'
#00FF00
'
,
'
#00FFFF
'
,
'
#0000FF
'
,
'
#8B00FF
'
,],
//线的颜色
...
...
@@ -22,11 +23,12 @@ g.data_mgr = {
//获得默认数据
getDefaultData
()
{
const
dataJson
=
'
{ "contentObj": { "title":"frd iwhfii9w","pageArr": [{ "pageInfo": [{ "a_pic_url": "http://staging-teach.cdn.ireadabc.com/19d51663c49a4faed1fd569de26611a3.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/7629f54dc9ae5e3c556b4d898509f888.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3", "groupLabel": "
", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/e813b164253de04bbcdd9f1a38cc228d.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/2c5f7fedc1cdcb91dda5bb621a2d0235.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/20f16608cf7fc6499eb1f942e625658d.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/205722475ccaca6233b2f28e635405ca.mp3", "groupLabel": "", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/9d7bdb483c7690728f0658022753c8ed.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/9d7bdb483c7690728f0658022753c8ed.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/0b6ef24f15c6d8ad7bf27cc913445ebf.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/b2c170f84b85dddf554b5c837d1d6e30.mp3", "groupLabel": "", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/7502f454d1edc0d1d52efbe8a9b2020a.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/7502f454d1edc0d1d52efbe8a9b2020a.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/1e3e361ef1953dec43f250278be63e1d.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/a589225b18d35b045bc52e283ec7cceb.mp3", "groupLabel": "", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/86fb8f1694cf0d5d2d81c26fecfae709.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/a41083db803c2f15cd67402f4b751b87.png", "a_audio_url": "", "b_audio_url": "", "groupLabel": "", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/adccd435985b8ce20737e4b6a235d88f.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/2c5f7fedc1cdcb91dda5bb621a2d0235.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/69cbbc96cd60283120521ad606f8c886.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/11bcdcf1720dd260b90a0f4b523633f8.mp3", "groupLabel": "", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }] }, { "pageInfo": [{ "a_pic_url": "http://staging-teach.cdn.ireadabc.com/7629f54dc9ae5e3c556b4d898509f888.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/2c5f7fedc1cdcb91dda5bb621a2d0235.png", "a_audio_url": "", "b_audio_url": "", "groupLabel": "", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/19d51663c49a4faed1fd569de26611a3.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/7629f54dc9ae5e3c556b4d898509f888.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/a787397544260023572b154914ff961b.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/4fb9a05072f2b3c0493a2fcbb55307bf.mp3", "groupLabel": "", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/e813b164253de04bbcdd9f1a38cc228d.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/2c5f7fedc1cdcb91dda5bb621a2d0235.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/cc93f9eacb135dbeba69857d37d2a0fd.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/3806065de519a70e2758f2b5ed46f7c1.mp3", "groupLabel": "", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/9d7bdb483c7690728f0658022753c8ed.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/7629f54dc9ae5e3c556b4d898509f888.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/3ed9f5f1278b67380e792d94e7a7564b.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/87fb5b526def6f946c5991490ce31475.mp3", "groupLabel": "", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/c9147ba4f6865137f78a9a6331c81151.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/502c5d3a110c40a6bfcf1a2cd1dab9ea.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/69cbbc96cd60283120521ad606f8c886.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/87fb5b526def6f946c5991490ce31475.mp3", "groupLabel": "", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/9159668d6274ead9dc1ab0cd8cd2e442.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/adccd435985b8ce20737e4b6a235d88f.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/4fb9a05072f2b3c0493a2fcbb55307bf.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/3d2d9f1ed700be793508ab79d6de76a2.mp3", "groupLabel": "
", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }] }] } }
'
const
dataJson
=
'
{ "contentObj": { "title":"frd iwhfii9w","pageArr": [{ "pageInfo": [{ "a_pic_url": "http://staging-teach.cdn.ireadabc.com/19d51663c49a4faed1fd569de26611a3.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/7629f54dc9ae5e3c556b4d898509f888.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3", "groupLabel": "
I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" ,"type":"Spine","ske_json":"http://staging-teach.cdn.ireadabc.com/e48564e39f64ef92dee4309b3493652a.json","ske_json_name":"mao_ske.json","tex_json":"http://staging-teach.cdn.ireadabc.com/233b2f102f321086b70c239a1bd4ba1a.json","tex_json_name":"mao_tex.json","tex_png":"http://staging-teach.cdn.ireadabc.com/d5c00d0cf339484801dc235ed33200d0.png","tex_png_name":"mao_tex.png"}, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/e813b164253de04bbcdd9f1a38cc228d.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/2c5f7fedc1cdcb91dda5bb621a2d0235.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/20f16608cf7fc6499eb1f942e625658d.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/205722475ccaca6233b2f28e635405ca.mp3", "groupLabel": "I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" ,"type":"Image"}, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/9d7bdb483c7690728f0658022753c8ed.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/9d7bdb483c7690728f0658022753c8ed.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/0b6ef24f15c6d8ad7bf27cc913445ebf.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/b2c170f84b85dddf554b5c837d1d6e30.mp3", "groupLabel": "I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" ,"type":"Image"}, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/7502f454d1edc0d1d52efbe8a9b2020a.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/7502f454d1edc0d1d52efbe8a9b2020a.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/1e3e361ef1953dec43f250278be63e1d.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/a589225b18d35b045bc52e283ec7cceb.mp3", "groupLabel": "I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" ,"type":"Image"}, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/86fb8f1694cf0d5d2d81c26fecfae709.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/a41083db803c2f15cd67402f4b751b87.png", "a_audio_url": "", "b_audio_url": "", "groupLabel": "I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" ,"type":"Image"}, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/adccd435985b8ce20737e4b6a235d88f.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/2c5f7fedc1cdcb91dda5bb621a2d0235.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/69cbbc96cd60283120521ad606f8c886.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/11bcdcf1720dd260b90a0f4b523633f8.mp3", "groupLabel": "I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }] ,"type":"Image"}, { "pageInfo": [{ "a_pic_url": "http://staging-teach.cdn.ireadabc.com/7629f54dc9ae5e3c556b4d898509f888.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/2c5f7fedc1cdcb91dda5bb621a2d0235.png", "a_audio_url": "", "b_audio_url": "", "groupLabel": "I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" ,"type":"Image"}, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/19d51663c49a4faed1fd569de26611a3.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/7629f54dc9ae5e3c556b4d898509f888.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/a787397544260023572b154914ff961b.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/4fb9a05072f2b3c0493a2fcbb55307bf.mp3", "groupLabel": "I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" ,"type":"Image"}, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/e813b164253de04bbcdd9f1a38cc228d.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/2c5f7fedc1cdcb91dda5bb621a2d0235.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/cc93f9eacb135dbeba69857d37d2a0fd.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/3806065de519a70e2758f2b5ed46f7c1.mp3", "groupLabel": "I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" ,"type":"Image"}, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/9d7bdb483c7690728f0658022753c8ed.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/7629f54dc9ae5e3c556b4d898509f888.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/3ed9f5f1278b67380e792d94e7a7564b.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/87fb5b526def6f946c5991490ce31475.mp3", "groupLabel": "I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" ,"type":"Image"}, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/c9147ba4f6865137f78a9a6331c81151.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/502c5d3a110c40a6bfcf1a2cd1dab9ea.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/69cbbc96cd60283120521ad606f8c886.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/87fb5b526def6f946c5991490ce31475.mp3", "groupLabel": "I am Ala", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" ,"type":"Image"}, { "a_pic_url": "http://staging-teach.cdn.ireadabc.com/9159668d6274ead9dc1ab0cd8cd2e442.png", "b_pic_url": "http://staging-teach.cdn.ireadabc.com/adccd435985b8ce20737e4b6a235d88f.png", "a_audio_url": "http://staging-teach.cdn.ireadabc.com/4fb9a05072f2b3c0493a2fcbb55307bf.mp3", "b_audio_url": "http://staging-teach.cdn.ireadabc.com/3d2d9f1ed700be793508ab79d6de76a2.mp3", "groupLabel": "I am Ala
", "groupPic": "http://staging-teach.cdn.ireadabc.com/376ac33efcae601263566d37c61005e3.png", "common_pic_url": "http://staging-teach.cdn.ireadabc.com/28ef69eeb008a030ce1fbb237a5d0637.png" }] }] } }
'
const
data
=
JSON
.
parse
(
dataJson
);
return
data
;
},
//{"contentObj":{"pageArr":[{"pageInfo":[{"a_pic_url":"http://staging-teach.cdn.ireadabc.com/4c987bc8980e235c6b6e2ae9a409cfc1.png","b_pic_url":"http://staging-teach.cdn.ireadabc.com/1ffb03273ae56047adab077dc8cc794c.png","a_audio_url":"","b_audio_url":"","groupLabel":"11111","groupPic":"http://staging-teach.cdn.ireadabc.com/2d349cf780b1fcec761a2350936183f0.png","type":"Image"},{"a_pic_url":"","b_pic_url":"","a_audio_url":"","b_audio_url":"","groupLabel":"a","groupPic":"" ,"type":"Spine","ske_json":"http://staging-teach.cdn.ireadabc.com/e48564e39f64ef92dee4309b3493652a.json","ske_json_name":"mao_ske.json","tex_json":"http://staging-teach.cdn.ireadabc.com/233b2f102f321086b70c239a1bd4ba1a.json","tex_json_name":"mao_tex.json","tex_png":"http://staging-teach.cdn.ireadabc.com/d5c00d0cf339484801dc235ed33200d0.png","tex_png_name":"mao_tex.png"}]},{"pageInfo":[]},{"pageInfo":[{"a_pic_url":"","b_pic_url":"","a_audio_url":"","b_audio_url":"","groupLabel":"","groupPic":"","type":"Spine","uploadData":"","uploadUrl":"","ske_json":"http://staging-teach.cdn.ireadabc.com/e48564e39f64ef92dee4309b3493652a.json","ske_json_name":"mao_ske.json"}]}],"title":"16516510","audio_url":"http://staging-teach.cdn.ireadabc.com/bfcd329e246551615375ce0788fc397e.mp3"},"type":"Image"}
//重置数据
resGameData
()
{
this
.
_imageResList
=
[];
...
...
play/assets/tmpGame/script/manager/res_mgr.js
View file @
8acdd228
...
...
@@ -53,13 +53,47 @@ g.res_mgr = {
if
(
audio_url
)
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
cb
&&
cb
(
audioClip
);
// const audioId = cc.audioEngine.play(audioClip, false, 0.8);
// if (cb) {
// cc.audioEngine.setFinishCallback(audioId, () => {
// cb();
// });
// }
});
}
},
//加载龙骨
loadSpine
(
animationDisplay
,
Info
)
{
if
(
Info
.
type
==
'
Image
'
)
{
return
;
}
cc
.
assetManager
.
loadAny
([{
url
:
Info
.
tex_json
,
ext
:
'
.txt
'
},
{
url
:
Info
.
ske_json
,
ext
:
'
.txt
'
}],
(
error
,
assets
)
=>
{
if
(
error
)
{
console
.
log
(
error
)
}
else
{
cc
.
assetManager
.
loadRemote
(
Info
.
tex_png
,
(
error
,
texture
)
=>
{
if
(
error
)
{
console
.
log
(
error
)
}
else
{
var
atlas
=
new
dragonBones
.
DragonBonesAtlasAsset
();
atlas
.
_uuid
=
Info
.
tex_json
;
atlas
.
atlasJson
=
assets
[
0
];
atlas
.
texture
=
texture
;
var
asset
=
new
dragonBones
.
DragonBonesAsset
();
asset
.
_uuid
=
Info
.
ske_json
;
asset
.
dragonBonesJson
=
assets
[
1
];
animationDisplay
.
dragonAtlasAsset
=
atlas
;
animationDisplay
.
dragonAsset
=
asset
;
let
data
=
asset
.
_dragonBonesJsonData
.
armature
[
0
];
if
(
!
data
)
{
return
;
}
animationDisplay
.
armatureName
=
data
.
name
;
g
.
data_mgr
.
dragonName
=
data
.
animation
[
0
].
name
;
animationDisplay
.
node
.
active
=
true
;
}
});
}
});
},
}
\ No newline at end of file
play/assets/tmpGame/script/manager/snd_mgr.js
View file @
8acdd228
// 声音管理器
g
.
snd_mgr
=
{
bgmId
:
-
1
,
// 背景音乐的音频ID
effIds
:
[],
// 音效的音频ID列表(由cc.audioEngine保证音频ID不重复)
bgmVol
:
1
,
// 背景音乐音量
neweffId
:
null
,
//保存上一个音效ID
effVol
:
1
,
// 音效音量
pausebgVol
:
1
,
pauseeffVol
:
1
,
sndNativeUrls
:
{},
newsnd
:
null
,
init
:
function
()
{
var
local_storage
=
g
.
local_storage
;
var
music_vol
=
local_storage
.
getMusicVolume
();
var
effect_vol
=
local_storage
.
getEffectsVolume
();
music_vol
!=
undefined
&&
music_vol
+
""
!=
""
&&
this
.
setMusicVolume
(
music_vol
);
effect_vol
!=
undefined
&&
effect_vol
+
""
!=
""
&&
this
.
setEffectsVolume
(
effect_vol
);
},
delAudId
:
function
(
id
)
{
if
(
id
==
this
.
bgmId
)
{
this
.
bgmId
=
-
1
;
return
;
}
for
(
var
i
=
0
;
i
<
this
.
effIds
.
length
;
++
i
)
{
if
(
this
.
effIds
[
i
]
==
id
)
{
this
.
effIds
.
splice
(
i
,
1
);
return
;
}
}
},
playMusic
:
function
(
snd
,
_loop
,
finishCB
)
{
if
(
!
snd
)
return
;
this
.
newsnd
=
snd
;
var
loop
=
_loop
?
false
:
true
;
// 除非指定为false,否则默认为true
// if (g.configs.platform == "vo") {
// this.bgmId = cc.audioEngine.play(snd, loop);
// return;
// }
this
.
bgmId
=
cc
.
audioEngine
.
playMusic
(
snd
,
loop
);
// 播放完成回调
if
(
finishCB
)
{
cc
.
audioEngine
.
setFinishCallback
(
this
.
bgmId
,
function
()
{
finishCB
();
});
}
bgmId
:
-
1
,
// 背景音乐的音频ID
effIds
:
[],
// 音效的音频ID列表(由cc.audioEngine保证音频ID不重复)
bgmVol
:
1
,
// 背景音乐音量
neweffId
:
null
,
//保存上一个音效ID
effVol
:
1
,
// 音效音量
pausebgVol
:
1
,
pauseeffVol
:
1
,
sndNativeUrls
:
{},
newsnd
:
null
,
init
:
function
()
{
var
local_storage
=
g
.
local_storage
;
var
music_vol
=
local_storage
.
getMusicVolume
();
var
effect_vol
=
local_storage
.
getEffectsVolume
();
music_vol
!=
undefined
&&
music_vol
+
""
!=
""
&&
this
.
setMusicVolume
(
music_vol
);
effect_vol
!=
undefined
&&
effect_vol
+
""
!=
""
&&
this
.
setEffectsVolume
(
effect_vol
);
},
delAudId
:
function
(
id
)
{
if
(
id
==
this
.
bgmId
)
{
this
.
bgmId
=
-
1
;
return
;
}
for
(
var
i
=
0
;
i
<
this
.
effIds
.
length
;
++
i
)
{
if
(
this
.
effIds
[
i
]
==
id
)
{
this
.
effIds
.
splice
(
i
,
1
);
return
;
}
}
},
playMusic
:
function
(
snd
,
_loop
,
finishCB
)
{
if
(
!
snd
)
return
;
this
.
newsnd
=
snd
;
var
loop
=
_loop
?
false
:
true
;
// 除非指定为false,否则默认为true
// if (g.configs.platform == "vo") {
// this.bgmId = cc.audioEngine.play(snd, loop);
// return;
// }
this
.
bgmId
=
cc
.
audioEngine
.
playMusic
(
snd
,
loop
);
// 播放完成回调
if
(
finishCB
)
{
cc
.
audioEngine
.
setFinishCallback
(
this
.
bgmId
,
function
()
{
finishCB
();
});
}
},
playEffect
:
function
(
snd
,
finishCB
)
{
if
(
!
snd
||
this
.
effVol
==
0
)
return
;
var
id
=
cc
.
audioEngine
.
playEffect
(
snd
,
false
);
// 音效限定不能重复播放
this
.
playaudioEffect
(
id
,
finishCB
);
},
//播放音效
playaudioEffect
:
function
(
id
,
finishCB
)
{
var
self
=
this
;
this
.
neweffId
=
id
;
this
.
effIds
.
push
(
id
);
// 播放完记得删ID
cc
.
audioEngine
.
setFinishCallback
(
id
,
function
()
{
self
.
delAudId
(
id
);
finishCB
&&
finishCB
();
});
},
pauseVolume
:
function
()
{
cc
.
audioEngine
.
stopAll
();
},
resumeVolume
:
function
()
{
if
(
this
.
newsnd
!=
null
)
{
cc
.
audioEngine
.
playMusic
(
this
.
newsnd
)
}
},
setMusicVolume
:
function
(
percent
)
{
this
.
bgmVol
=
percent
;
cc
.
audioEngine
.
setMusicVolume
(
~~
percent
);
},
setEffectsVolume
:
function
(
percent
)
{
this
.
effVol
=
percent
;
cc
.
audioEngine
.
setEffectsVolume
(
~~
percent
);
cc
.
audioEngine
.
setMusicVolume
(
~~
this
.
bgmVol
);
},
},
playEffect
:
function
(
snd
,
finishCB
)
{
if
(
!
snd
||
this
.
effVol
==
0
)
return
;
var
id
=
cc
.
audioEngine
.
playEffect
(
snd
,
false
);
// 音效限定不能重复播放
this
.
playaudioEffect
(
id
,
finishCB
);
},
//播放音效
playaudioEffect
:
function
(
id
,
finishCB
)
{
var
self
=
this
;
this
.
neweffId
=
id
;
this
.
effIds
.
push
(
id
);
// 播放完记得删ID
cc
.
audioEngine
.
setFinishCallback
(
id
,
function
()
{
self
.
delAudId
(
id
);
finishCB
&&
finishCB
();
});
},
pauseVolume
:
function
()
{
cc
.
audioEngine
.
stopAll
();
},
resumeVolume
:
function
()
{
if
(
this
.
newsnd
!=
null
)
{
cc
.
audioEngine
.
playMusic
(
this
.
newsnd
)
}
},
setMusicVolume
:
function
(
percent
)
{
this
.
bgmVol
=
percent
;
cc
.
audioEngine
.
setMusicVolume
(
~~
percent
);
},
setEffectsVolume
:
function
(
percent
)
{
this
.
effVol
=
percent
;
cc
.
audioEngine
.
setEffectsVolume
(
~~
percent
);
cc
.
audioEngine
.
setMusicVolume
(
~~
this
.
bgmVol
);
},
};
\ 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