Commit 81b8a486 authored by huoshizhe's avatar huoshizhe

feat: 音效、表单、屏幕适配完成

parent 6b9f8308
......@@ -69,7 +69,8 @@ const runSpawn = async function (){
let zippath = path.resolve(__dirname,"../dist", pkg.name);
//压缩包的存放目录
let date = new Date();
let zipname = pkg.name+"_"+date.Format("yyyyMMdd hh-mm-ss");
// let zipname = pkg.name+"_"+date.Format("yyyyMMdd hh-mm-ss");
let zipname = 'form';
let zipdir = path.resolve(__dirname,"../publish/"+zipname+".zip");
clean(zipdir); //删除原有的包
......
<div class="model-content">
<div class="border" style=" width: 520px;">
<span style="height: 30px; font-size: 18px;">已选字母:</span>
<div *ngFor="let letter of item.letterList; let i = index">
<div style="float: left; width: 60px;">
<span style="font-size: 50px;align-content: center;">{{letter}}</span>
<br>
<button style="color: red;" nz-button nzType="dashed" class="add-btn" (click)="removeLetter(i)">
X
</button>
</div>
</div>
<div style="float: none;clear: both;">&nbsp;</div>
</div>
<div class="border" style=" width: 520px;">
<span style="height: 30px; font-size: 18px;">可选字母:</span>
<br>
<a (click)="addLetter('Q')" style="font-size: 50px; width: 50px;">Q&nbsp;</a>
<a (click)="addLetter('W')" style="font-size: 50px; width: 50px;">W&nbsp;</a>
<a (click)="addLetter('E')" style="font-size: 50px; width: 50px;">E&nbsp;</a>
<a (click)="addLetter('R')" style="font-size: 50px; width: 50px;">R&nbsp;</a>
<a (click)="addLetter('T')" style="font-size: 50px; width: 50px;">T&nbsp;</a>
<a (click)="addLetter('Y')" style="font-size: 50px; width: 50px;">Y&nbsp;</a>
<a (click)="addLetter('U')" style="font-size: 50px; width: 50px;">U&nbsp;</a>
<a (click)="addLetter('I')" style="font-size: 50px; width: 50px;">I&nbsp;</a>
<a (click)="addLetter('O')" style="font-size: 50px; width: 50px;">O&nbsp;</a>
<a (click)="addLetter('P')" style="font-size: 50px; width: 50px;">P&nbsp;</a>
<br>
<a (click)="addLetter('A')" style="font-size: 50px; margin-left: 20px;">A&nbsp;</a>
<a (click)="addLetter('S')" style="font-size: 50px;">S&nbsp;</a>
<a (click)="addLetter('D')" style="font-size: 50px;">D&nbsp;</a>
<a (click)="addLetter('F')" style="font-size: 50px;">F&nbsp;</a>
<a (click)="addLetter('G')" style="font-size: 50px;">G&nbsp;</a>
<a (click)="addLetter('H')" style="font-size: 50px;">H&nbsp;</a>
<a (click)="addLetter('J')" style="font-size: 50px;">J&nbsp;</a>
<a (click)="addLetter('K')" style="font-size: 50px;">K&nbsp;</a>
<a (click)="addLetter('L')" style="font-size: 50px;">L&nbsp;</a>
<br>
<a (click)="addLetter('Z')" style="font-size: 50px; margin-left: 40px;">Z&nbsp;</a>
<a (click)="addLetter('X')" style="font-size: 50px;">X&nbsp;</a>
<a (click)="addLetter('C')" style="font-size: 50px;">C&nbsp;</a>
<a (click)="addLetter('V')" style="font-size: 50px;">V&nbsp;</a>
<a (click)="addLetter('B')" style="font-size: 50px;">B&nbsp;</a>
<a (click)="addLetter('N')" style="font-size: 50px;">N&nbsp;</a>
<a (click)="addLetter('M')" style="font-size: 50px;">M&nbsp;</a>
</div>
<!-- <div class="border" style=" width: 520px; height: 120px;">
<span style="height: 30px; font-size: 18px;">单词音频:</span>
<br>
......
......@@ -18,25 +18,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
createShell() {
this.item.wordList.push({
word: '',
audio: '',
backWord: '',
backWordAudio: '',
});
this.save();
}
removeShell(idx) {
this.item.wordList.splice(idx, 1);
this.save();
}
ngOnInit() {
this.item = {
wordList: []
letterList: []
};
// 获取存储的数据
......@@ -54,6 +39,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}, this.saveKey);
}
addLetter(letter) {
this.item.letterList.push(letter);
}
removeLetter(idx) {
this.item.letterList.splice(idx, 1);
}
ngOnChanges() {
}
......@@ -84,16 +77,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.save();
}
onWordAudioUploadSuccess(e, idx) {
this.item.wordList[idx].audio = e.url;
this.save();
}
onBackWordAudioUploadSuccess(e, idx) {
this.item.wordList[idx].backWordAudio = e.url;
this.save();
}
/**
* 储存数据
*/
......
{
"ver": "1.1.2",
"uuid": "e3a6dfce-a78b-45e1-aaba-502ad7d9eebc",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "749ad49e-6dd6-4340-9582-e0d4ff3d9790",
"downloadMode": 0,
"duration": 0.536,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "697b6d98-8c8c-4377-b281-e552027bae2c",
"downloadMode": 0,
"duration": 0.512,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "4a6c1ace-6cb6-4605-96f1-bb973cbc70b1",
"downloadMode": 0,
"duration": 0.752,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "4c49cedc-16ef-42e0-be45-22a068eb4f7b",
"downloadMode": 0,
"duration": 0.632,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "321daa19-9e08-4fdb-8383-104ac3da0e7c",
"downloadMode": 0,
"duration": 0.632,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "a9f7e82b-85bc-4cd0-ad8b-18c11364e4dc",
"downloadMode": 0,
"duration": 0.752,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "c5e20e4a-b61a-4193-bfc1-0b9ddbb9c26c",
"downloadMode": 0,
"duration": 0.656,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "f6797b4f-af97-49ee-a91f-a673386e2eba",
"downloadMode": 0,
"duration": 0.536,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "d1fdb3cc-09db-49c1-b5ad-e7c5424225dc",
"downloadMode": 0,
"duration": 0.584,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "3dd88676-2229-45f5-b8d2-432264bccf43",
"downloadMode": 0,
"duration": 0.584,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "ea09147a-afb9-4f38-9290-b326ac1c8a6e",
"downloadMode": 0,
"duration": 0.512,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "7617def7-988f-4434-bc12-28a930671819",
"downloadMode": 0,
"duration": 0.704,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "33fb57e7-03d1-4c48-9777-bad307b35f8b",
"downloadMode": 0,
"duration": 0.632,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "c5794023-d6ee-4a59-acfc-500ce33d8604",
"downloadMode": 0,
"duration": 0.704,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "9ab449db-7ce6-4939-a991-f06c61e063a7",
"downloadMode": 0,
"duration": 0.68,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "e81f2129-fd31-4a59-a9c1-119f7afcdd2c",
"downloadMode": 0,
"duration": 0.536,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "a954ea39-ea23-4ad5-8a51-11fa99a77f14",
"downloadMode": 0,
"duration": 0.704,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "9de57423-97d9-435e-b85c-3ba6cd627bfd",
"downloadMode": 0,
"duration": 0.824,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "21e7bf6f-0702-4e8e-84e9-ffb24b8768c8",
"downloadMode": 0,
"duration": 0.776,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "2a47e8f9-45c3-4712-a4f0-2237e4cdc54c",
"downloadMode": 0,
"duration": 0.752,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "4ceab02f-5ba4-4396-9bbd-311120d8c47c",
"downloadMode": 0,
"duration": 0.704,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "70a36255-9d1e-4190-bbd0-b1aa92462cb8",
"downloadMode": 0,
"duration": 0.752,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "54147b60-f71b-433b-8307-5465f952c0cc",
"downloadMode": 0,
"duration": 0.704,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "9c5e7269-dc13-4b6c-b4fd-0d77d3b026c3",
"downloadMode": 0,
"duration": 0.776,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "11598a70-89c2-4392-ac2c-0d421fe14098",
"downloadMode": 0,
"duration": 0.656,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "e27a893b-3ab0-4284-9b97-72478c4d5cc4",
"downloadMode": 0,
"duration": 0.632,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "0b1b213c-91e5-4791-a7ed-1e4820b78a5a",
"downloadMode": 0,
"duration": 1.358367,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "9535d2bf-bb9b-427e-a0c7-da09cc341786",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "644233b2-8efb-4aaa-addb-94ec50a46aa3",
"downloadMode": 0,
"duration": 1.008,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "77d897ac-6118-4f78-b560-fb441965d2d4",
"downloadMode": 0,
"duration": 0.972,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "37a34770-608b-435d-a3f2-e07a8b754356",
"downloadMode": 0,
"duration": 1.188,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "767dca12-ab58-4146-939a-f711c28e53ff",
"downloadMode": 0,
"duration": 1.26,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "a689da9b-5bfe-4a14-b508-f8302f1ea066",
"downloadMode": 0,
"duration": 1.296,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "919702ed-d7e6-4382-844a-2a496fc62ba7",
"downloadMode": 0,
"duration": 1.404,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "8e320a13-3259-416a-9c85-1eaf67d34c88",
"downloadMode": 0,
"duration": 1.332,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "c323f318-8aa3-4479-9719-14d8785448d2",
"downloadMode": 0,
"duration": 0.972,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "a098be6f-6eab-4598-bab5-36e41b1ad813",
"downloadMode": 0,
"duration": 1.152,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "47b06ec0-ba1a-46dc-8b2c-a9d52516adef",
"downloadMode": 0,
"duration": 1.044,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "aee01f46-5879-471e-abce-9f9f03d2a3b8",
"downloadMode": 0,
"duration": 1.548,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "4454b9f4-2eee-45c1-a7f3-703c3014ea4a",
"downloadMode": 0,
"duration": 1.332,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "99579f70-7fbb-4b5a-aa38-ba40c57cac76",
"downloadMode": 0,
"duration": 1.404,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "2b85b24c-3027-44b7-b8d5-3d27ae6ad7d1",
"downloadMode": 0,
"duration": 1.368,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "d38e87a0-23c6-45f3-8a0c-7309d509f608",
"downloadMode": 0,
"duration": 1.584,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "3e2043b6-7434-4be3-a8cb-735a81b091c6",
"downloadMode": 0,
"duration": 1.44,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "a8e79b72-9039-426c-8ffe-71e1c48a7f71",
"downloadMode": 0,
"duration": 1.764,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "8280a669-6c1f-4818-8ecf-29e84f6f20de",
"downloadMode": 0,
"duration": 1.368,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "7789aecb-372a-4a22-9b63-d53cc7f5eab8",
"downloadMode": 0,
"duration": 1.476,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "daaec7f0-5c74-4f15-b443-9dda6114f187",
"downloadMode": 0,
"duration": 1.332,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "8d2f695d-3e13-4800-92a6-3f8708efdf83",
"downloadMode": 0,
"duration": 1.28,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "0ed355f1-211c-4611-82f7-e6533d8df19c",
"downloadMode": 0,
"duration": 1.541224,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "5081ba57-e62c-4126-89df-0b6f68693c71",
"downloadMode": 0,
"duration": 1.776327,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "4540ed2f-ea8c-4a2b-9d52-0cf626aa1250",
"downloadMode": 0,
"duration": 1.906939,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "1f520668-e254-45a8-ae25-9414e331669e",
"downloadMode": 0,
"duration": 1.593469,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "ac891479-dd88-4cc4-bcac-45c323251fde",
"downloadMode": 0,
"duration": 1.48898,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "ce78a635-168b-45b2-b4c9-9402444f335f",
"downloadMode": 0,
"duration": 0.30325,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "046cfc8b-c79c-45e2-94fc-a445b922329c",
"downloadMode": 0,
"duration": 0.130612,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "ac3e766f-d299-4426-b5b7-a4ea30921976",
"downloadMode": 0,
"duration": 2.298776,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "e191ccf9-cd5b-4cae-a9e6-3cc1a3cf4c53",
"downloadMode": 0,
"duration": 2.35102,
"subMetas": {}
}
\ No newline at end of file
......@@ -75,19 +75,22 @@
"__id__": 5
},
{
"__id__": 114
"__id__": 115
},
{
"__id__": 124
}
],
"_active": true,
"_components": [
{
"__id__": 123
"__id__": 126
},
{
"__id__": 124
"__id__": 127
},
{
"__id__": 125
"__id__": 128
}
],
"_prefab": null,
......@@ -285,7 +288,11 @@
}
],
"_active": true,
"_components": [],
"_components": [
{
"__id__": 114
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -5058,7 +5065,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "2bYG+XA1FDOIYGLEpPjdIM"
"_id": "b75XRNrQJFfrbNJkE4nkqZ"
},
{
"__type__": "cc.Label",
......@@ -5094,7 +5101,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "5ate2908dC0Y9GPdD0GHCs"
"_id": "36idDU3kNPbpLhtGjCInf4"
},
{
"__type__": "cc.PrivateNode",
......@@ -5157,7 +5164,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "39v4RfB8JF/a/KSx2v3gOe"
"_id": "34wwFz0B1NzrbBz3f1kmNP"
},
{
"__type__": "cc.Label",
......@@ -5193,7 +5200,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "1fgK940YBE8JdLW0GWddhf"
"_id": "c7JRQ68bJPrIG06NYYTOJT"
},
{
"__type__": "cc.RichText",
......@@ -5708,6 +5715,33 @@
"_N$target": null,
"_id": "0cENlny1lPSKFen/zYCvnX"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1280,
"_originalHeight": 720,
"_id": "4eoL9UMldEuLOZnZ/mmMcz"
},
{
"__type__": "cc.Node",
"_name": "RibbonNodeBase",
......@@ -5717,16 +5751,16 @@
},
"_children": [
{
"__id__": 115
"__id__": 116
},
{
"__id__": 117
"__id__": 118
},
{
"__id__": 119
"__id__": 120
},
{
"__id__": 121
"__id__": 122
}
],
"_active": true,
......@@ -5784,13 +5818,13 @@
"_name": "RibbonNode_0",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 115
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 116
"__id__": 117
}
],
"_prefab": null,
......@@ -5846,7 +5880,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 115
"__id__": 116
},
"_enabled": true,
"_materials": [
......@@ -5878,13 +5912,13 @@
"_name": "RibbonNode_1",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 115
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 118
"__id__": 119
}
],
"_prefab": null,
......@@ -5940,7 +5974,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 117
"__id__": 118
},
"_enabled": true,
"_materials": [
......@@ -5972,13 +6006,13 @@
"_name": "RibbonNode_2",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 115
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 120
"__id__": 121
}
],
"_prefab": null,
......@@ -6034,7 +6068,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
"__id__": 120
},
"_enabled": true,
"_materials": [
......@@ -6066,13 +6100,13 @@
"_name": "RibbonNode_3",
"_objFlags": 0,
"_parent": {
"__id__": 114
"__id__": 115
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 122
"__id__": 123
}
],
"_prefab": null,
......@@ -6128,7 +6162,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 121
"__id__": 122
},
"_enabled": true,
"_materials": [
......@@ -6155,6 +6189,249 @@
"_atlas": null,
"_id": "cbaCoH8nlCJocyKe6f8YHW"
},
{
"__type__": "cc.Node",
"_name": "MusicNode",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 125
}
],
"_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": "d4B58Wzq1A04n26eNaJaAi"
},
{
"__type__": "193f7Pj1dtKzIc1hLupu+6E",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
},
"_enabled": true,
"star": {
"__uuid__": "0b1b213c-91e5-4791-a7ed-1e4820b78a5a"
},
"按住": {
"__uuid__": "ce78a635-168b-45b2-b4c9-9402444f335f"
},
"按钮": {
"__uuid__": "046cfc8b-c79c-45e2-94fc-a445b922329c"
},
"撒花": {
"__uuid__": "ac3e766f-d299-4426-b5b7-a4ea30921976"
},
"放大": {
"__uuid__": "e191ccf9-cd5b-4cae-a9e6-3cc1a3cf4c53"
},
"letterA": {
"__uuid__": "749ad49e-6dd6-4340-9582-e0d4ff3d9790"
},
"letterB": {
"__uuid__": "7617def7-988f-4434-bc12-28a930671819"
},
"letterC": {
"__uuid__": "54147b60-f71b-433b-8307-5465f952c0cc"
},
"letterD": {
"__uuid__": "11598a70-89c2-4392-ac2c-0d421fe14098"
},
"letterE": {
"__uuid__": "e27a893b-3ab0-4284-9b97-72478c4d5cc4"
},
"letterF": {
"__uuid__": "697b6d98-8c8c-4377-b281-e552027bae2c"
},
"letterG": {
"__uuid__": "4a6c1ace-6cb6-4605-96f1-bb973cbc70b1"
},
"letterH": {
"__uuid__": "4c49cedc-16ef-42e0-be45-22a068eb4f7b"
},
"letterI": {
"__uuid__": "321daa19-9e08-4fdb-8383-104ac3da0e7c"
},
"letterJ": {
"__uuid__": "a9f7e82b-85bc-4cd0-ad8b-18c11364e4dc"
},
"letterK": {
"__uuid__": "c5e20e4a-b61a-4193-bfc1-0b9ddbb9c26c"
},
"letterL": {
"__uuid__": "f6797b4f-af97-49ee-a91f-a673386e2eba"
},
"letterM": {
"__uuid__": "d1fdb3cc-09db-49c1-b5ad-e7c5424225dc"
},
"letterN": {
"__uuid__": "3dd88676-2229-45f5-b8d2-432264bccf43"
},
"letterO": {
"__uuid__": "ea09147a-afb9-4f38-9290-b326ac1c8a6e"
},
"letterP": {
"__uuid__": "33fb57e7-03d1-4c48-9777-bad307b35f8b"
},
"letterQ": {
"__uuid__": "c5794023-d6ee-4a59-acfc-500ce33d8604"
},
"letterR": {
"__uuid__": "9ab449db-7ce6-4939-a991-f06c61e063a7"
},
"letterS": {
"__uuid__": "e81f2129-fd31-4a59-a9c1-119f7afcdd2c"
},
"letterT": {
"__uuid__": "a954ea39-ea23-4ad5-8a51-11fa99a77f14"
},
"letterU": {
"__uuid__": "9de57423-97d9-435e-b85c-3ba6cd627bfd"
},
"letterV": {
"__uuid__": "21e7bf6f-0702-4e8e-84e9-ffb24b8768c8"
},
"letterW": {
"__uuid__": "2a47e8f9-45c3-4712-a4f0-2237e4cdc54c"
},
"letterX": {
"__uuid__": "4ceab02f-5ba4-4396-9bbd-311120d8c47c"
},
"letterY": {
"__uuid__": "70a36255-9d1e-4190-bbd0-b1aa92462cb8"
},
"letterZ": {
"__uuid__": "9c5e7269-dc13-4b6c-b4fd-0d77d3b026c3"
},
"wordA": {
"__uuid__": "644233b2-8efb-4aaa-addb-94ec50a46aa3"
},
"wordB": {
"__uuid__": "77d897ac-6118-4f78-b560-fb441965d2d4"
},
"wordC": {
"__uuid__": "37a34770-608b-435d-a3f2-e07a8b754356"
},
"wordD": {
"__uuid__": "767dca12-ab58-4146-939a-f711c28e53ff"
},
"wordE": {
"__uuid__": "a689da9b-5bfe-4a14-b508-f8302f1ea066"
},
"wordF": {
"__uuid__": "919702ed-d7e6-4382-844a-2a496fc62ba7"
},
"wordG": {
"__uuid__": "8e320a13-3259-416a-9c85-1eaf67d34c88"
},
"wordH": {
"__uuid__": "c323f318-8aa3-4479-9719-14d8785448d2"
},
"wordI": {
"__uuid__": "a098be6f-6eab-4598-bab5-36e41b1ad813"
},
"wordJ": {
"__uuid__": "47b06ec0-ba1a-46dc-8b2c-a9d52516adef"
},
"wordK": {
"__uuid__": "aee01f46-5879-471e-abce-9f9f03d2a3b8"
},
"wordL": {
"__uuid__": "4454b9f4-2eee-45c1-a7f3-703c3014ea4a"
},
"wordM": {
"__uuid__": "99579f70-7fbb-4b5a-aa38-ba40c57cac76"
},
"wordN": {
"__uuid__": "2b85b24c-3027-44b7-b8d5-3d27ae6ad7d1"
},
"wordO": {
"__uuid__": "d38e87a0-23c6-45f3-8a0c-7309d509f608"
},
"wordP": {
"__uuid__": "3e2043b6-7434-4be3-a8cb-735a81b091c6"
},
"wordQ": {
"__uuid__": "a8e79b72-9039-426c-8ffe-71e1c48a7f71"
},
"wordR": {
"__uuid__": "8280a669-6c1f-4818-8ecf-29e84f6f20de"
},
"wordS": {
"__uuid__": "7789aecb-372a-4a22-9b63-d53cc7f5eab8"
},
"wordT": {
"__uuid__": "daaec7f0-5c74-4f15-b443-9dda6114f187"
},
"wordU": {
"__uuid__": "8d2f695d-3e13-4800-92a6-3f8708efdf83"
},
"wordV": {
"__uuid__": "0ed355f1-211c-4611-82f7-e6533d8df19c"
},
"wordW": {
"__uuid__": "5081ba57-e62c-4126-89df-0b6f68693c71"
},
"wordX": {
"__uuid__": "4540ed2f-ea8c-4a2b-9d52-0cf626aa1250"
},
"wordY": {
"__uuid__": "1f520668-e254-45a8-ae25-9414e331669e"
},
"wordZ": {
"__uuid__": "ac891479-dd88-4cc4-bcac-45c323251fde"
},
"_id": "80xvYs8F9MOYH02l3APRyx"
},
{
"__type__": "cc.Canvas",
"_name": "",
......
......@@ -333,6 +333,8 @@ cc.Class({
const pictureWordBigBg = cc.find('Canvas/LetterPicturePage/PictureWordBigBg');
btnSwitch.on('click', () => {
this.playEffect('按钮');
changeToBig.active = !changeToBig.active;
bigLetterBase.active = !bigLetterBase.active;
pictureWordBigBg.active = !pictureWordBigBg.active;
......@@ -343,6 +345,7 @@ cc.Class({
});
smallLetterBase.on('click', () => {
this.playEffect(`letter${this.letter.toUpperCase()}`);
cc.tween(smallLetterBase)
.to(0.1, { angle: 5 })
.to(0.1, { angle: -5 })
......@@ -350,6 +353,7 @@ cc.Class({
.start();
});
bigLetterBase.on('click', () => {
this.playEffect(`letter${this.letter.toUpperCase()}`);
cc.tween(bigLetterBase)
.to(0.1, { angle: 5 })
.to(0.1, { angle: -5 })
......@@ -358,35 +362,49 @@ cc.Class({
});
pictureWordSmallBg.on('click', () => {
jelly(pictureWordSmallBg);
this.playEffect(`word${this.letter.toUpperCase()}`);
});
pictureWordBigBg.on('click', () => {
jelly(pictureWordBigBg);
this.playEffect(`word${this.letter.toUpperCase()}`);
});
let btnClicked = false;
const btnBefore = cc.find('Canvas/LetterPicturePage/BtnBefore');
const btnNext = cc.find('Canvas/LetterPicturePage/BtnNext');
btnBefore.on('click', () => {
jelly(btnBefore);
btnBefore.on('click', async () => {
if (btnClicked) {
return;
}
btnClicked = true;
this.playEffect('按钮');
await jelly(btnBefore);
this._status.currentLetterIdx--;
this._status.currentLetterIdx = Math.max(this._status.currentLetterIdx, 0);
this.updateLetter();
btnClicked = false;
});
btnNext.on('click', () => {
jelly(btnNext);
btnNext.on('click', async () => {
if (btnClicked) {
return;
}
btnClicked = true;
this.playEffect('按钮');
await jelly(btnNext);
this._status.currentLetterIdx++;
this._status.currentLetterIdx = Math.min(this._status.currentLetterIdx, this.data.letterList.length - 1);
this.updateLetter();
btnClicked = false;
});
},
onLoadFinish() {
this.initListeners();
this._status = {
currentLetterIdx: 0,
currentStrokeIdx: 0,
......@@ -493,6 +511,17 @@ cc.Class({
letterNodeBase.name = 'letterNodeBase';
letterNodeBase.parent = this.node;
letterNodeBase.addComponent(cc.Widget);
const widgetComponent = letterNodeBase.getComponent(cc.Widget);
widgetComponent.isAlignTop = true;
widgetComponent.isAlignBottom = true;
widgetComponent.isAlignLeft = true;
widgetComponent.isAlignRight = true;
widgetComponent.top = 0;
widgetComponent.bottom = 0;
widgetComponent.left = 0;
widgetComponent.right = 0;
if (letter == letter.toLowerCase()) {
const monkeyUpperNode = cc.instantiate(this.monkeyUpperNode);
monkeyUpperNode.parent = letterNodeBase;
......@@ -508,6 +537,7 @@ cc.Class({
}
this.updateArrows(this._status.currentStrokeIdx);
});
btnUpdate.active = false;
this.updateArrows(this._status.currentStrokeIdx);
// this.drawCompleteLine(this._status.currentStrokeIdx);
......@@ -520,9 +550,9 @@ cc.Class({
speakerNode.on('click', async () => {
this.startSpeakerAnime(speakerNode);
setTimeout(() => {
this.stopSpeakerAnime(speakerNode);
}, 3500);
await this.playEffect(`letter${this.letter.toUpperCase()}`);
this.stopSpeakerAnime(speakerNode);
});
let showMonkey = false;
......@@ -681,7 +711,9 @@ cc.Class({
},
onSharkMoveStart(event) {
jelly(this.sharkNode);
this.sharkNode.startPos = event.getLocation();
this.playEffect('按住');
this.onDrawStart(event);
this.onSharkMoving(event);
},
......@@ -796,8 +828,11 @@ cc.Class({
async showOver() {
this.hideShark();
this.playEffect('放大');
await this.showCompleteStar();
this.playEffect(`letter${this.letter.toUpperCase()}`);
await this.showRibbons();
this.playEffect('撒花');
await this.showCloud();
this.pageFlyOut();
if (this.letter !== this.letter.toLowerCase()) {
......@@ -807,12 +842,15 @@ cc.Class({
},
async showCompleteStar() {
this.starNode.zIndex = 10;
cc.tween(this.starNode)
.to(0.1, { opacity: 255 })
.to(1, { x: 0, y: 0, scale: 3 })
.to(1, { scale: 6, opacity: 0 })
.start();
return new Promise((resolve, reject) => {
this.starNode.zIndex = 10;
cc.tween(this.starNode)
.to(0.1, { opacity: 255 })
.to(1, { x: 0, y: 0, scale: 3 })
.to(1, { scale: 6, opacity: 0 })
.call(resolve)
.start();
})
},
async showCloud() {
......@@ -916,6 +954,8 @@ cc.Class({
.to(0.1, { opacity: 0 })
.start();
this.playEffect('star');
await asyncPlayDragonBoneAnimation(starAnimeNode, 'star', 1);
starAnimeNode.parent = null;
starAnimeNode = null;
......@@ -1031,4 +1071,9 @@ cc.Class({
return true;
},
async playEffect(name, loop, volume) {
let musicComponent = cc.find('Canvas/MusicNode').getComponent('MusicNode');
await musicComponent.playEffect(name, loop, volume);
}
});
......@@ -24,35 +24,233 @@ cc.Class({
// this._bar = value;
// }
// },
bgm: {
star: {
default: null,
type: cc.AudioClip
},
星星: {
按住: {
default: null,
type: cc.AudioClip
},
爆炸: {
按钮: {
default: null,
type: cc.AudioClip
},
眩晕: {
撒花: {
default: null,
type: cc.AudioClip
},
: {
放大: {
default: null,
type: cc.AudioClip
},
移动: {
letterA: {
default: null,
type: cc.AudioClip
},
letterB: {
default: null,
type: cc.AudioClip
},
letterC: {
default: null,
type: cc.AudioClip
},
letterD: {
default: null,
type: cc.AudioClip
},
letterE: {
default: null,
type: cc.AudioClip
},
letterF: {
default: null,
type: cc.AudioClip
},
letterG: {
default: null,
type: cc.AudioClip
},
letterH: {
default: null,
type: cc.AudioClip
},
letterI: {
default: null,
type: cc.AudioClip
},
letterJ: {
default: null,
type: cc.AudioClip
},
letterK: {
default: null,
type: cc.AudioClip
},
letterL: {
default: null,
type: cc.AudioClip
},
letterM: {
default: null,
type: cc.AudioClip
},
letterN: {
default: null,
type: cc.AudioClip
},
letterO: {
default: null,
type: cc.AudioClip
},
letterP: {
default: null,
type: cc.AudioClip
},
letterQ: {
default: null,
type: cc.AudioClip
},
letterR: {
default: null,
type: cc.AudioClip
},
letterS: {
default: null,
type: cc.AudioClip
},
letterT: {
default: null,
type: cc.AudioClip
},
letterU: {
default: null,
type: cc.AudioClip
},
letterV: {
default: null,
type: cc.AudioClip
},
letterW: {
default: null,
type: cc.AudioClip
},
letterX: {
default: null,
type: cc.AudioClip
},
letterY: {
default: null,
type: cc.AudioClip
},
letterZ: {
default: null,
type: cc.AudioClip
},
wordA: {
default: null,
type: cc.AudioClip
},
wordB: {
default: null,
type: cc.AudioClip
},
wordC: {
default: null,
type: cc.AudioClip
},
wordD: {
default: null,
type: cc.AudioClip
},
wordE: {
default: null,
type: cc.AudioClip
},
wordF: {
default: null,
type: cc.AudioClip
},
wordG: {
default: null,
type: cc.AudioClip
},
wordH: {
default: null,
type: cc.AudioClip
},
wordI: {
default: null,
type: cc.AudioClip
},
wordJ: {
default: null,
type: cc.AudioClip
},
wordK: {
default: null,
type: cc.AudioClip
},
wordL: {
default: null,
type: cc.AudioClip
},
wordM: {
default: null,
type: cc.AudioClip
},
wordN: {
default: null,
type: cc.AudioClip
},
wordO: {
default: null,
type: cc.AudioClip
},
wordP: {
default: null,
type: cc.AudioClip
},
wordQ: {
default: null,
type: cc.AudioClip
},
wordR: {
default: null,
type: cc.AudioClip
},
wordS: {
default: null,
type: cc.AudioClip
},
wordT: {
default: null,
type: cc.AudioClip
},
wordU: {
default: null,
type: cc.AudioClip
},
wordV: {
default: null,
type: cc.AudioClip
},
wordW: {
default: null,
type: cc.AudioClip
},
wordX: {
default: null,
type: cc.AudioClip
},
结束: {
wordY: {
default: null,
type: cc.AudioClip
},
点击: {
wordZ: {
default: null,
type: cc.AudioClip
},
......@@ -67,7 +265,10 @@ cc.Class({
},
playEffect(name, loop = false, volume = 1) {
cc.audioEngine.play(this[name], loop, volume);
return new Promise((resolve, reject) => {
const audioID = cc.audioEngine.play(this[name], loop, volume);
cc.audioEngine.setFinishCallback(audioID, resolve);
})
}
// update (dt) {},
});
......@@ -2,9 +2,7 @@
"title": "play",
"packageName": "org.cocos2d.demo",
"startScene": "47e552a5-ddf7-471f-8f5b-c13cdfbd30e5",
"excludeScenes": [
"88348c25-a511-4103-8004-36e5ba35317f"
],
"excludeScenes": [],
"includeSDKBox": false,
"orientation": {
"landscapeLeft": true,
......@@ -18,7 +16,7 @@
"mainCompressionType": "default",
"mainIsRemote": false,
"optimizeHotUpdate": false,
"md5Cache": true,
"md5Cache": false,
"nativeMd5Cache": true,
"encryptJs": true,
"xxteaKey": "f1c582d4-ad03-4a",
......
......@@ -31,5 +31,6 @@
"live": {
"enable": false
}
}
},
"last-module-event-record-time": 1599035847551
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment