Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Sbox_FT_08
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
Sbox_FT_08
Commits
52646d3e
Commit
52646d3e
authored
Nov 29, 2020
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev commit
parent
7021d7af
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1608 additions
and
948 deletions
+1608
-948
app.module.ts
form/src/app/app.module.ts
+20
-16
upload-dragon-bones.component.html
...on/upload-dragon-bones/upload-dragon-bones.component.html
+53
-0
upload-dragon-bones.component.scss
...on/upload-dragon-bones/upload-dragon-bones.component.scss
+5
-0
upload-dragon-bones.component.ts
...mmon/upload-dragon-bones/upload-dragon-bones.component.ts
+147
-0
form.component.html
form/src/app/form/form.component.html
+37
-8
form.component.ts
form/src/app/form/form.component.ts
+10
-19
resources.meta
play/assets/resources.meta
+12
-0
Scene.fire
play/assets/tmpGame/scene/Scene.fire
+1051
-424
Cartoon.js
play/assets/tmpGame/script/Cartoon.js
+12
-7
GameLogic.js
play/assets/tmpGame/script/GameLogic.js
+114
-471
Scene.js
play/assets/tmpGame/script/Scene.js
+3
-3
snow_1.png
play/assets/tmpGame/textures/snow_1.png
+0
-0
snow_1.png.meta
play/assets/tmpGame/textures/snow_1.png.meta
+36
-0
snow_2.png
play/assets/tmpGame/textures/snow_2.png
+0
-0
snow_2.png.meta
play/assets/tmpGame/textures/snow_2.png.meta
+36
-0
snow_3.png
play/assets/tmpGame/textures/snow_3.png
+0
-0
snow_3.png.meta
play/assets/tmpGame/textures/snow_3.png.meta
+36
-0
snow_4.png
play/assets/tmpGame/textures/snow_4.png
+0
-0
snow_4.png.meta
play/assets/tmpGame/textures/snow_4.png.meta
+36
-0
No files found.
form/src/app/app.module.ts
View file @
52646d3e
import
zh
from
"
@angular/common/locales/zh
"
;
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
;
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
;
import
{
NgModule
,
ErrorHandler
}
from
'
@angular/core
'
;
import
{
NgModule
,
ErrorHandler
}
from
'
@angular/core
'
;
import
{
MyErrorHandler
}
from
'
./MyError
'
;
import
{
MyErrorHandler
}
from
'
./MyError
'
;
import
{
AppComponent
}
from
'
./app.component
'
;
import
{
AppComponent
}
from
"
./app.component
"
;
import
{
NgZorroAntdModule
,
NZ_I18N
,
zh_CN
}
from
'
ng-zorro-antd
'
;
import
{
NgZorroAntdModule
,
NZ_I18N
,
zh_CN
}
from
"
ng-zorro-antd
"
;
import
{
FormsModule
}
from
'
@angular/forms
'
;
import
{
FormsModule
}
from
"
@angular/forms
"
;
import
{
HttpClientModule
}
from
'
@angular/common/http
'
;
import
{
HttpClientModule
}
from
"
@angular/common/http
"
;
import
{
BrowserAnimationsModule
}
from
'
@angular/platform-browser/animations
'
;
import
{
BrowserAnimationsModule
}
from
"
@angular/platform-browser/animations
"
;
import
{
registerLocaleData
}
from
'
@angular/common
'
;
import
{
registerLocaleData
}
from
"
@angular/common
"
;
import
zh
from
'
@angular/common/locales/zh
'
;
import
{
FormComponent
}
from
"
./form/form.component
"
;
import
{
FormComponent
}
from
'
./form/form.component
'
;
import
{
PlayComponent
}
from
"
./play/play.component
"
;
import
{
PlayComponent
}
from
'
./play/play.component
'
;
import
{
LessonTitleConfigComponent
}
from
"
./common/lesson-title-config/lesson-title-config.component
"
;
import
{
LessonTitleConfigComponent
}
from
'
./common/lesson-title-config/lesson-title-config.component
'
;
import
{
BackgroundImagePipe
}
from
"
./pipes/background-image.pipe
"
;
import
{
BackgroundImagePipe
}
from
'
./pipes/background-image.pipe
'
;
import
{
UploadImageWithPreviewComponent
}
from
"
./common/upload-image-with-preview/upload-image-with-preview.component
"
;
import
{
UploadImageWithPreviewComponent
}
from
'
./common/upload-image-with-preview/upload-image-with-preview.component
'
;
import
{
PlayerContentWrapperComponent
}
from
"
./common/player-content-wrapper/player-content-wrapper.component
"
;
import
{
PlayerContentWrapperComponent
}
from
'
./common/player-content-wrapper/player-content-wrapper.component
'
;
import
{
CustomHotZoneComponent
}
from
"
./common/custom-hot-zone/custom-hot-zone.component
"
;
import
{
CustomHotZoneComponent
}
from
'
./common/custom-hot-zone/custom-hot-zone.component
'
;
import
{
UploadVideoComponent
}
from
"
./common/upload-video/upload-video.component
"
;
import
{
UploadVideoComponent
}
from
'
./common/upload-video/upload-video.component
'
;
import
{
UploadDragonBonesComponent
}
from
"
./common/upload-dragon-bones/upload-dragon-bones.component
"
;
import
{
TimePipe
}
from
'
./pipes/time.pipe
'
;
import
{
TimePipe
}
from
'
./pipes/time.pipe
'
;
import
{
ResourcePipe
}
from
'
./pipes/resource.pipe
'
;
import
{
ResourcePipe
}
from
'
./pipes/resource.pipe
'
;
import
{
AudioRecorderComponent
}
from
'
./common/audio-recorder/audio-recorder.component
'
;
import
{
AudioRecorderComponent
}
from
'
./common/audio-recorder/audio-recorder.component
'
;
...
@@ -40,7 +44,7 @@ registerLocaleData(zh);
...
@@ -40,7 +44,7 @@ registerLocaleData(zh);
TimePipe
,
TimePipe
,
UploadVideoComponent
,
UploadVideoComponent
,
CustomHotZoneComponent
,
CustomHotZoneComponent
,
UploadDragonBonesComponent
,
PlayerContentWrapperComponent
PlayerContentWrapperComponent
],
],
...
...
form/src/app/common/upload-dragon-bones/upload-dragon-bones.component.html
0 → 100644
View file @
52646d3e
<!--龙骨面板-->
<p>
<span>
</span>
<button
nz-button
nzType=
"dashed"
(
click
)="
setAnimaBtnClick
(
dragonBones
)"
nzSize=
"large"
>
<i
nz-icon
nzType=
"tool"
nzTheme=
"outline"
></i>
{{buttonText}}
</button>
</p>
<nz-modal
[(
nzVisible
)]="
animaPanelVisible
"
nzTitle=
"配置资源文件"
(
nzOnCancel
)="
animaPanelCancel
()"
(
nzOnOk
)="
animaPanelOk
()"
nzOkText=
"保存"
>
<div
class=
"anima-upload-btn"
>
<span
style=
"margin-right: 10px"
>
上传 ske_json 文件:
</span>
<nz-upload
[
nzShowUploadList
]="
false
"
nzAccept=
"application/json"
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
(
nzChange
)="
skeJsonHandleChange
($
event
)"
>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i><span>
Upload
</span></button>
</nz-upload>
<i
*
ngIf=
"isSkeJsonLoading"
style=
"margin-left: 10px;"
nz-icon
[
nzType
]="'
loading
'"
></i>
<span
*
ngIf=
"skeJsonData['name']"
style=
"margin-left: 10px"
><u>
{{skeJsonData['name']}}
</u></span>
</div>
<div
class=
"anima-upload-btn"
>
<span
style=
"margin-right: 10px"
>
上传 tex_json 文件:
</span>
<nz-upload
[
nzShowUploadList
]="
false
"
nzAccept=
"application/json"
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
(
nzChange
)="
texJsonHandleChange
($
event
)"
>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i><span>
Upload
</span></button>
</nz-upload>
<i
*
ngIf=
"isTexJsonLoading"
style=
"margin-left: 10px;"
nz-icon
[
nzType
]="'
loading
'"
></i>
<span
*
ngIf=
"texJsonData['name']"
style=
"margin-left: 10px"
><u>
{{texJsonData['name']}}
</u></span>
</div>
<div
class=
"anima-upload-btn"
>
<span
style=
"margin-right: 10px"
>
上传 tex_png 文件:
</span>
<nz-upload
[
nzShowUploadList
]="
false
"
nzAccept =
"image/*"
[
nzAction
]="
uploadUrl
"
[
nzData
]="
uploadData
"
(
nzChange
)="
texPngHandleChange
($
event
)"
>
<button
nz-button
><i
nz-icon
nzType=
"upload"
></i><span>
Upload
</span></button>
</nz-upload>
<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>
</div>
</nz-modal>
\ No newline at end of file
form/src/app/common/upload-dragon-bones/upload-dragon-bones.component.scss
0 → 100644
View file @
52646d3e
@import
'../../style/common_mixin.css'
;
.anima-upload-btn
{
margin-bottom
:
10px
;
}
\ No newline at end of file
form/src/app/common/upload-dragon-bones/upload-dragon-bones.component.ts
0 → 100644
View file @
52646d3e
import
{
Component
,
ElementRef
,
EventEmitter
,
Input
,
Output
,
OnInit
,
OnChanges
,
ViewChild
}
from
'
@angular/core
'
;
import
{
NzMessageService
,
UploadChangeParam
,
UploadFile
,
UploadFileStatus
}
from
'
ng-zorro-antd
'
;
import
{
DomSanitizer
,
SafeResourceUrl
}
from
'
@angular/platform-browser
'
;
@
Component
({
selector
:
'
upload-dragon-bones
'
,
templateUrl
:
'
./upload-dragon-bones.component.html
'
,
styleUrls
:
[
'
./upload-dragon-bones.component.scss
'
]
})
export
class
UploadDragonBonesComponent
implements
OnInit
,
OnChanges
{
@
Input
()
textDragonBones
=
{
skeJsonData
:
{
url
:
""
,
name
:
""
},
texJsonData
:
{
url
:
""
,
name
:
""
},
texPngData
:
{
url
:
""
,
name
:
""
}
};
@
Input
()
buttonText
:
string
=
"
配置骨骼动画
"
@
Output
()
change
=
new
EventEmitter
();
@
ViewChild
(
'
videoNode
'
,
{
static
:
true
})
videoNode
:
ElementRef
;
uploadUrl
;
uploadData
;
animaPanelVisible
:
boolean
=
false
;
isSkeJsonLoading
=
false
;
isTexJsonLoading
=
false
;
isTexPngLoading
=
false
;
skeJsonData
=
{};
texJsonData
=
{};
texPngData
=
{};
dragonBones
=
{
skeJsonData
:
{
url
:
""
,
name
:
""
},
texJsonData
:
{
url
:
""
,
name
:
""
},
texPngData
:
{
url
:
""
,
name
:
""
}
};
constructor
(
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
;
};
}
ngOnInit
()
{
if
(
this
.
textDragonBones
)
{
if
(
!
this
.
textDragonBones
.
skeJsonData
)
{
this
.
textDragonBones
.
skeJsonData
=
{
url
:
""
,
name
:
""
}
}
if
(
!
this
.
textDragonBones
.
texJsonData
)
{
this
.
textDragonBones
.
texJsonData
=
{
url
:
""
,
name
:
""
}
}
if
(
!
this
.
textDragonBones
.
texPngData
)
{
this
.
textDragonBones
.
texPngData
=
{
url
:
""
,
name
:
""
}
}
}
else
{
this
.
textDragonBones
=
{
skeJsonData
:
{
url
:
""
,
name
:
""
},
texJsonData
:
{
url
:
""
,
name
:
""
},
texPngData
:
{
url
:
""
,
name
:
""
}
};
}
this
.
dragonBones
=
this
.
textDragonBones
;
}
ngOnChanges
()
{
}
animaPanelCancel
()
{
this
.
animaPanelVisible
=
false
;
}
animaPanelOk
()
{
this
.
animaPanelVisible
=
false
;
this
.
change
.
emit
({
texPngData
:
this
.
texPngData
,
texJsonData
:
this
.
texJsonData
,
skeJsonData
:
this
.
skeJsonData
,
})
}
setAnimaBtnClick
(
dragonBones
)
{
const
{
skeJsonData
,
texJsonData
,
texPngData
}
=
dragonBones
;
this
.
skeJsonData
=
skeJsonData
||
{};
this
.
texJsonData
=
texJsonData
||
{};
this
.
texPngData
=
texPngData
||
{};
this
.
animaPanelVisible
=
true
;
}
skeJsonHandleChange
(
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
)
{
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
)
{
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
;
}
}
}
form/src/app/form/form.component.html
View file @
52646d3e
...
@@ -11,29 +11,55 @@
...
@@ -11,29 +11,55 @@
<div
style=
"margin-bottom: 10px;"
>
<div
style=
"margin-bottom: 10px;"
>
<nz-form-item
>
<nz-form-item
>
<nz-form-label
[
nzSpan
]="
2
"
nzFor=
"email"
>
背景音乐
</nz-form-label>
<nz-form-label
[
nzSpan
]="
2
"
nzFor=
"email"
>
背景音乐
</nz-form-label>
<nz-form-control
[
nzSpan
]="
4
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
[
audioUrl
]="
contentObj
.
bgMusic
"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
contentObj
,
'
bgMusic
')"
></app-audio-recorder>
<app-audio-recorder
[
audioUrl
]="
contentObj
.
bgMusic
"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
contentObj
,
'
bgMusic
')"
></app-audio-recorder>
</nz-form-control>
</nz-form-control>
<nz-form-label
[
nzSpan
]="
2
"
nzFor=
"email"
>
题意音频
</nz-form-label>
<nz-form-label
[
nzSpan
]="
2
"
nzFor=
"email"
>
题意音频
</nz-form-label>
<nz-form-control
[
nzSpan
]="
4
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
[
audioUrl
]="
contentObj
.
questionAudio_url
"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
contentObj
,
'
questionAudio_url
')"
></app-audio-recorder>
<app-audio-recorder
[
audioUrl
]="
contentObj
.
questionAudio_url
"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
contentObj
,
'
questionAudio_url
')"
></app-audio-recorder>
</nz-form-control>
</nz-form-control>
<nz-form-label
[
nzSpan
]="
2
"
nzFor=
"email"
>
标题
</nz-form-label>
<nz-form-label
[
nzSpan
]="
2
"
nzFor=
"email"
>
标题
</nz-form-label>
<nz-form-control
[
nzSpan
]="
4
"
>
<nz-form-control
[
nzSpan
]="
6
"
>
<input
type=
"text"
nz-input
placeholder=
"请输入标题"
[(
ngModel
)]="
contentObj
.
titleText
"
(
blur
)="
saveItem
()"
style=
"width: 250px;"
/>
<input
type=
"text"
nz-input
placeholder=
"请输入标题"
[(
ngModel
)]="
contentObj
.
titleText
"
(
blur
)="
saveItem
()"
style=
"width: 250px;"
/>
</nz-form-control>
</nz-form-control>
</nz-form-item
>
</nz-form-item
>
<nz-form-item
>
<nz-form-label
[
nzSpan
]="
2
"
nzFor=
"email"
>
围巾小鸟
</nz-form-label>
<nz-form-control
[
nzSpan
]="
8
"
>
<upload-dragon-bones
[
textDragonBones
]="
contentObj
.
birdDragonBones_1
"
(
change
)="
updateDragonBones
($
event
,
'
birdDragonBones_1
',
contentObj
)"
></upload-dragon-bones>
</nz-form-control>
</nz-form-item
>
<nz-form-item
>
<nz-form-label
[
nzSpan
]="
2
"
nzFor=
"email"
>
黄帽子小鸟
</nz-form-label>
<nz-form-control
[
nzSpan
]="
8
"
>
<upload-dragon-bones
[
textDragonBones
]="
contentObj
.
birdDragonBones_2
"
(
change
)="
updateDragonBones
($
event
,
'
birdDragonBones_2
',
contentObj
)"
></upload-dragon-bones>
</nz-form-control>
</nz-form-item
>
<nz-form-item
>
<nz-form-label
[
nzSpan
]="
2
"
nzFor=
"email"
>
音频小鸟
</nz-form-label>
<nz-form-control
[
nzSpan
]="
8
"
>
<upload-dragon-bones
[
textDragonBones
]="
contentObj
.
birdDragonBones_2
"
(
change
)="
updateDragonBones
($
event
,
'
birdDragonBones_audio
',
contentObj
)"
></upload-dragon-bones>
</nz-form-control>
</nz-form-item
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
*
ngFor=
"let item of contentObj.dataArray; let i = index"
class=
"card-item"
style=
"padding: 0.5vw; "
>
<div
*
ngFor=
"let item of contentObj.dataArray; let i = index"
class=
"card-item"
style=
"padding: 0.5vw; "
>
<div
class=
"card-item-content border"
>
<div
class=
"card-item-content border"
>
<div
class=
"card-item-content"
>
<div
class=
"card-item-content"
>
...
@@ -43,6 +69,9 @@
...
@@ -43,6 +69,9 @@
<div
class=
"section"
>
<div
class=
"section"
>
<div
class=
"section-content"
>
<div
class=
"section-content"
>
<div
style=
"display: flex; margin-bottom: 10px;"
>
</div>
<div
style=
"display: flex; margin-bottom: 10px;"
>
<div
style=
"display: flex; margin-bottom: 10px;"
>
<div
style=
"flex:1"
>
<div
style=
"flex:1"
>
图片
图片
...
...
form/src/app/form/form.component.ts
View file @
52646d3e
...
@@ -37,6 +37,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -37,6 +37,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
bgMusic
:
""
,
bgMusic
:
""
,
titleText
:
""
,
titleText
:
""
,
questionAudio_url
:
""
,
questionAudio_url
:
""
,
birdDragonBones_1
:
{},
birdDragonBones_2
:
{},
birdDragonBones_audio
:
{},
dataArray
:
[]
dataArray
:
[]
}
}
...
@@ -46,13 +49,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -46,13 +49,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
}
handleQuestionTypeChange
(){
handleQuestionTypeChange
(){
// if(this.contentObj.question.type != 'LongAudio'){
// if(this.contentObj.question.type != 'LongAudio'){
// this.contentObj.answerType='Text'
// this.contentObj.answerType='Text'
...
@@ -76,10 +72,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -76,10 +72,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
refresh
();
this
.
refresh
();
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
item
=
{};
this
.
item
=
{};
this
.
item
.
contentObj
=
{};
this
.
item
.
contentObj
=
{};
...
@@ -103,12 +95,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -103,12 +95,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
// this.save()
// this.save()
},
this
.
KEY
);
},
this
.
KEY
);
}
}
ngOnChanges
()
{
}
ngOn
Destroy
()
{
ngOn
Changes
()
{}
}
ngOnDestroy
()
{
}
init
()
{
init
()
{
if
(
Object
.
keys
(
this
.
item
.
contentObj
).
length
!=
0
&&
this
.
item
.
contentObj
.
version
&&
this
.
item
.
contentObj
.
version
==
this
.
contentObj
.
version
)
{
if
(
Object
.
keys
(
this
.
item
.
contentObj
).
length
!=
0
&&
this
.
item
.
contentObj
.
version
&&
this
.
item
.
contentObj
.
version
==
this
.
contentObj
.
version
)
{
...
@@ -128,7 +117,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -128,7 +117,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
return
{
isText
:
true
,
text
:
""
,
image_url
:
""
}
return
{
isText
:
true
,
text
:
""
,
image_url
:
""
}
}
}
initData
()
{
initData
()
{
}
}
...
@@ -157,7 +145,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -157,7 +145,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
}
addItem
(
item
?,
type
?)
{
addItem
(
item
?,
type
?)
{
item
.
push
({
text
:
""
,
image_url
:
""
})
item
.
push
({
text
:
""
,
image_url
:
""
,
dragonBones
:
{}
})
this
.
saveItem
();
this
.
saveItem
();
}
}
...
@@ -167,12 +155,15 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -167,12 +155,15 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
save
();
this
.
save
();
}
}
onAudioUploadSuccessByItem
(
e
,
item
,
key
)
{
onAudioUploadSuccessByItem
(
e
,
item
,
key
)
{
item
[
key
]
=
e
.
url
item
[
key
]
=
e
.
url
this
.
save
();
this
.
save
();
}
}
updateDragonBones
(
e
,
key
,
item
)
{
item
[
key
]
=
e
;
this
.
saveItem
()
}
saveItem
()
{
saveItem
()
{
this
.
save
();
this
.
save
();
...
...
play/assets/resources.meta
0 → 100644
View file @
52646d3e
{
"ver": "1.1.2",
"uuid": "ee1f26de-eba7-4d48-9ff4-be76e2be964f",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/scene/Scene.fire
View file @
52646d3e
This diff is collapsed.
Click to expand it.
play/assets/tmpGame/script/Cartoon.js
View file @
52646d3e
...
@@ -290,16 +290,20 @@ class DragonBones {
...
@@ -290,16 +290,20 @@ class DragonBones {
const
image
=
dragonBonesConfig
.
texPngData
.
url
const
image
=
dragonBonesConfig
.
texPngData
.
url
const
ske
=
dragonBonesConfig
.
skeJsonData
.
url
const
ske
=
dragonBonesConfig
.
skeJsonData
.
url
const
atlas
=
dragonBonesConfig
.
texJsonData
.
url
const
atlas
=
dragonBonesConfig
.
texJsonData
.
url
cc
.
assetManager
.
loadRemote
(
image
,
(
error
,
texture
)
=>
{
console
.
log
(
image
)
cc
.
assetManager
.
loadRemote
(
atlas
,
(
error
,
atlasJson
)
=>
{
console
.
log
(
ske
)
cc
.
assetManager
.
loadRemote
(
url
,
(
error
,
dragonBonesJson
)
=>
{
console
.
log
(
atlas
)
cc
.
loader
.
load
(
image
,
(
error
,
texture
)
=>
{
cc
.
loader
.
load
({
url
:
atlas
,
type
:
'
txt
'
},
(
error
,
atlasJson
)
=>
{
cc
.
loader
.
load
({
url
:
ske
,
type
:
'
txt
'
},
(
error
,
dragonBonesJson
)
=>
{
const
atlas
=
new
dragonBones
.
DragonBonesAtlasAsset
();
const
atlas
=
new
dragonBones
.
DragonBonesAtlasAsset
();
atlas
.
atlasJson
=
atlasJson
;
atlas
.
atlasJson
=
(
atlasJson
)
;
atlas
.
texture
=
texture
;
atlas
.
texture
=
texture
;
const
asset
=
new
dragonBones
.
DragonBonesAsset
();
const
asset
=
new
dragonBones
.
DragonBonesAsset
();
asset
.
dragonBonesJson
=
dragonBonesJson
;
asset
.
dragonBonesJson
=
(
dragonBonesJson
)
;
dragonDisplay
.
dragonAtlasAsset
=
atlas
;
dragonDisplay
.
dragonAtlasAsset
=
atlas
;
dragonDisplay
.
dragonAsset
=
asset
;
dragonDisplay
.
dragonAsset
=
asset
;
...
@@ -345,8 +349,9 @@ class DragonBones {
...
@@ -345,8 +349,9 @@ class DragonBones {
}
}
showDragonBones
(
times
=
1
)
{
showDragonBones
(
times
=
1
)
{
console
.
log
(
this
.
_animationLoaded
)
if
(
this
.
_animationLoaded
&&
this
.
_animationLoaded
.
animaNames
.
length
>
0
)
{
if
(
this
.
_animationLoaded
&&
this
.
_animationLoaded
.
animaNames
.
length
>
0
)
{
this
.
_animationLoaded
.
playAnimation
(
this
.
_animationLoaded
.
animaNames
[
0
],
times
);
this
.
_animationLoaded
.
playAnimation
(
this
.
_animationLoaded
.
animaNames
[
0
],
-
1
);
}
}
}
}
}
}
\ No newline at end of file
play/assets/tmpGame/script/GameLogic.js
View file @
52646d3e
This diff is collapsed.
Click to expand it.
play/assets/tmpGame/script/Scene.js
View file @
52646d3e
...
@@ -92,9 +92,9 @@ cc.Class({
...
@@ -92,9 +92,9 @@ cc.Class({
getDefaultData
()
{
getDefaultData
()
{
// const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"","titleText":"TEstd","questionAudio_url":"","dataArray":[{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/06cc843598a912921f6ca3acfde6220b.png","audio_url":"http://staging-teach.cdn.ireadabc.com/3b5540cc95a006dff8c41dba7537075a.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/571974922f6678111348a5643dba7e20.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/78579114773af12a7aec6723e3b9d475.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/c99e82e1c3f087c6dc0469e30c624f70.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/5b45c89ac9e899d76522767219b1346b.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/2e28eae8f0e0f01193da6f3677379ed3.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/fad2dac4f8b59a185dc30d42617c2ca8.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/6c3fca11052464102407f173e4a83db9.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ec82c796af801486548ae98623f614d2.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ac4b9422df1556f80ac5c3058cd3d670.png"}]}}'
// const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"","titleText":"TEstd","questionAudio_url":"","dataArray":[{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/06cc843598a912921f6ca3acfde6220b.png","audio_url":"http://staging-teach.cdn.ireadabc.com/3b5540cc95a006dff8c41dba7537075a.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/571974922f6678111348a5643dba7e20.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/78579114773af12a7aec6723e3b9d475.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/c99e82e1c3f087c6dc0469e30c624f70.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/5b45c89ac9e899d76522767219b1346b.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/2e28eae8f0e0f01193da6f3677379ed3.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/fad2dac4f8b59a185dc30d42617c2ca8.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/6c3fca11052464102407f173e4a83db9.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ec82c796af801486548ae98623f614d2.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ac4b9422df1556f80ac5c3058cd3d670.png"}]}}'
//
const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"http://staging-teach.cdn.ireadabc.com/ad58bae62ea02cf215ce7dee22df306f.mp3","titleText":"TEstd","questionAudio_url":"http://staging-teach.cdn.ireadabc.com/2bf96923b83ee0c5f20930386ce07384.mp3","dataArray":[{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/06cc843598a912921f6ca3acfde6220b.png","audio_url":"http://staging-teach.cdn.ireadabc.com/3b5540cc95a006dff8c41dba7537075a.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/571974922f6678111348a5643dba7e20.png","audio_url":"http://staging-teach.cdn.ireadabc.com/ae7c0930a45d0ffc9f13182298e2be71.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/78579114773af12a7aec6723e3b9d475.png","audio_url":"http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/c99e82e1c3f087c6dc0469e30c624f70.png","audio_url":"http://staging-teach.cdn.ireadabc.com/135c628899396df62c14567f46d61f3f.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/5b45c89ac9e899d76522767219b1346b.png","audio_url":"http://staging-teach.cdn.ireadabc.com/3b5540cc95a006dff8c41dba7537075a.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/2e28eae8f0e0f01193da6f3677379ed3.png","audio_url":"http://staging-teach.cdn.ireadabc.com/cb0ac1d1bcdfdaf768f0a06d3fff37a3.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/fad2dac4f8b59a185dc30d42617c2ca8.png","audio_url":"http://staging-teach.cdn.ireadabc.com/9df3f14bc88bcffc49b6717c40428ed8.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/6c3fca11052464102407f173e4a83db9.png","audio_url":"http://staging-teach.cdn.ireadabc.com/d5a5ac2f45431a8a15492cb9f78e0396.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ec82c796af801486548ae98623f614d2.png","audio_url":"http://staging-teach.cdn.ireadabc.com/fb08783926362bf64232e2ec6966011d.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ac4b9422df1556f80ac5c3058cd3d670.png","audio_url":"http://staging-teach.cdn.ireadabc.com/fb08783926362bf64232e2ec6966011d.mp3"}]}}'
const
dataJson
=
'
{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"http://staging-teach.cdn.ireadabc.com/ad58bae62ea02cf215ce7dee22df306f.mp3","titleText":"TEstd","questionAudio_url":"http://staging-teach.cdn.ireadabc.com/2bf96923b83ee0c5f20930386ce07384.mp3","dataArray":[{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/06cc843598a912921f6ca3acfde6220b.png","audio_url":"http://staging-teach.cdn.ireadabc.com/3b5540cc95a006dff8c41dba7537075a.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/571974922f6678111348a5643dba7e20.png","audio_url":"http://staging-teach.cdn.ireadabc.com/ae7c0930a45d0ffc9f13182298e2be71.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/78579114773af12a7aec6723e3b9d475.png","audio_url":"http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/c99e82e1c3f087c6dc0469e30c624f70.png","audio_url":"http://staging-teach.cdn.ireadabc.com/135c628899396df62c14567f46d61f3f.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/5b45c89ac9e899d76522767219b1346b.png","audio_url":"http://staging-teach.cdn.ireadabc.com/3b5540cc95a006dff8c41dba7537075a.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/2e28eae8f0e0f01193da6f3677379ed3.png","audio_url":"http://staging-teach.cdn.ireadabc.com/cb0ac1d1bcdfdaf768f0a06d3fff37a3.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/fad2dac4f8b59a185dc30d42617c2ca8.png","audio_url":"http://staging-teach.cdn.ireadabc.com/9df3f14bc88bcffc49b6717c40428ed8.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/6c3fca11052464102407f173e4a83db9.png","audio_url":"http://staging-teach.cdn.ireadabc.com/d5a5ac2f45431a8a15492cb9f78e0396.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ec82c796af801486548ae98623f614d2.png","audio_url":"http://staging-teach.cdn.ireadabc.com/fb08783926362bf64232e2ec6966011d.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ac4b9422df1556f80ac5c3058cd3d670.png","audio_url":"http://staging-teach.cdn.ireadabc.com/fb08783926362bf64232e2ec6966011d.mp3"}]}}
'
// const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"
http://staging-teach.cdn.ireadabc.com/2bf96923b83ee0c5f20930386ce07384.mp3","titleText":"TEstd","questionAudio_url":"http://staging-teach.cdn.ireadabc.com/2bf96923b83ee0c5f20930386ce07384.mp3","dataArray":[{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ac4b9422df1556f80ac5c3058cd3d670.png","audio_url":"http://staging-teach.cdn.ireadabc.com/fb08783926362bf64232e2ec6966011d.mp3"}]
}}'
// const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"
","titleText":"TEST","questionAudio_url":"","dataArray":[{"text":"","image_url":"","dragonBones":{"texPngData":{"url":"","name":""},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/70f2284f40825f812603c2302ca23607.json","name":"鸟飞_tex.json"},"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/813eea2f97e13533a47ba94edd0a9f22.json","name":"鸟飞_ske.json"}}},{"text":"","image_url":"","dragonBones":{"texPngData":{"url":"","name":""},"texJsonData":{"url":"","name":""},"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/813eea2f97e13533a47ba94edd0a9f22.json","name":"鸟飞_ske.json"}}}],"birdDragonBones_1":{"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/3fa1882c54e339da6dd269c97f04bb2a.png","name":"bird1_tex.png"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/59b30e639be3a22584acec712dd78574.json","name":"bird1_tex.json"},"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/decfe2180607b27160bd34d07448898c.json","name":"bird1_ske.json"}},"birdDragonBones_2":{"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/09ff5666c731f45808e1c0f3d0bfc124.png","name":"bird2_tex.png"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/49231d10601dfadffedb9ee25dac164b.json","name":"bird2_tex.json"},"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/c39541350a2828337d5cecb59deac5e8.json","name":"bird2_ske.json"}}
}}'
const
dataJson
=
'
{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"","titleText":"","questionAudio_url":"","dataArray":[]}}
'
//
const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"","titleText":"","questionAudio_url":"","dataArray":[]}}'
const
data
=
JSON
.
parse
(
dataJson
);
const
data
=
JSON
.
parse
(
dataJson
);
return
data
;
return
data
;
},
},
...
...
play/assets/tmpGame/textures/snow_1.png
0 → 100644
View file @
52646d3e
3.09 KB
play/assets/tmpGame/textures/snow_1.png.meta
0 → 100644
View file @
52646d3e
{
"ver": "2.3.5",
"uuid": "19ea226d-eee6-4a1b-b2bc-6e48d4c6ba03",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 39,
"height": 44,
"platformSettings": {},
"subMetas": {
"snow_1": {
"ver": "1.0.4",
"uuid": "ada7613b-b4fd-4367-8d20-0366cd6461e8",
"rawTextureUuid": "19ea226d-eee6-4a1b-b2bc-6e48d4c6ba03",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 39,
"height": 44,
"rawWidth": 39,
"rawHeight": 44,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
play/assets/tmpGame/textures/snow_2.png
0 → 100644
View file @
52646d3e
2.14 KB
play/assets/tmpGame/textures/snow_2.png.meta
0 → 100644
View file @
52646d3e
{
"ver": "2.3.5",
"uuid": "fc81610c-bae3-42ec-8b38-3c5431715f3f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 33,
"height": 32,
"platformSettings": {},
"subMetas": {
"snow_2": {
"ver": "1.0.4",
"uuid": "65716f17-b067-4e1e-bdf9-c67894a38dc2",
"rawTextureUuid": "fc81610c-bae3-42ec-8b38-3c5431715f3f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 33,
"height": 32,
"rawWidth": 33,
"rawHeight": 32,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
play/assets/tmpGame/textures/snow_3.png
0 → 100644
View file @
52646d3e
1.72 KB
play/assets/tmpGame/textures/snow_3.png.meta
0 → 100644
View file @
52646d3e
{
"ver": "2.3.5",
"uuid": "7298e197-dd6f-4fed-b5c5-6f8a2cef5e31",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 25,
"height": 25,
"platformSettings": {},
"subMetas": {
"snow_3": {
"ver": "1.0.4",
"uuid": "5f3db4b3-4a26-4a1b-a3d0-f20c836f7ed0",
"rawTextureUuid": "7298e197-dd6f-4fed-b5c5-6f8a2cef5e31",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 25,
"height": 25,
"rawWidth": 25,
"rawHeight": 25,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
play/assets/tmpGame/textures/snow_4.png
0 → 100644
View file @
52646d3e
3.1 KB
play/assets/tmpGame/textures/snow_4.png.meta
0 → 100644
View file @
52646d3e
{
"ver": "2.3.5",
"uuid": "1c4f6e54-2c12-4136-b6da-16abb51bf0fe",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 39,
"height": 44,
"platformSettings": {},
"subMetas": {
"snow_4": {
"ver": "1.0.4",
"uuid": "e3a6979e-6673-4118-8ba6-bf8c837ee899",
"rawTextureUuid": "1c4f6e54-2c12-4136-b6da-16abb51bf0fe",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 39,
"height": 44,
"rawWidth": 39,
"rawHeight": 44,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"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