Commit 85d52699 authored by 李帅's avatar 李帅

初版

parent 1179bab9
{
"__type__": "cc.AnimationClip",
"_name": "play",
"_objFlags": 0,
"_native": "",
"_duration": 1,
"sample": 60,
"speed": 1,
"wrapMode": 2,
"curveData": {
"paths": {
"icon_myrecord1": {
"props": {
"active": [
{
"frame": 0,
"value": true
},
{
"frame": 0.3333333333333333,
"value": true
},
{
"frame": 0.6666666666666666,
"value": true
},
{
"frame": 1,
"value": true
}
]
}
},
"icon_myrecord2": {
"props": {
"active": [
{
"frame": 0,
"value": true
},
{
"frame": 0.3333333333333333,
"value": false
},
{
"frame": 0.6666666666666666,
"value": true
},
{
"frame": 1,
"value": true
}
]
}
},
"icon_myrecord3": {
"props": {
"active": [
{
"frame": 0,
"value": true
},
{
"frame": 0.3333333333333333,
"value": false
},
{
"frame": 0.6666666666666666,
"value": false
},
{
"frame": 1,
"value": true
}
]
}
}
}
},
"events": []
}
\ No newline at end of file
{
"ver": "2.1.0",
"uuid": "0d5372fb-b93d-48bc-8fef-9dd83cd1c642",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "c551970e-b095-45f3-9f1d-25cde8b8deb1",
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
/*
* @Author: ls
* @Date: 2022-05-21 21:59:51
* @LastEditTime: 2022-05-22 17:32:48
* @LastEditors: ls
* @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\script\Item.ts
*/
import simpleLabel from './simpleLabel';
const { ccclass, property } = cc._decorator;
@ccclass
export default class Item extends cc.Component {
@property(simpleLabel)
label: simpleLabel = null;
@property(cc.Node)
tip: cc.Node = null;
@property(cc.Node)
record: cc.Node = null;
@property(cc.Node)
record_click: cc.Node = null;
@property(cc.Node)
myrecord: cc.Node = null;
@property(cc.Node)
myrecord_play: cc.Node = null;
// 录制中
_recording = false;
// 已录音
_recorded = false;
protected start(): void {
// this.init('One day,her grandma got sick!');
}
/**
* 初始化
* @param str 字符串
*/
init(str: string) {
this.label.setString(str, this.node.width);
this.reset();
this.scheduleOnce(() => {
this.node.height = this.label.getRows() * 48; // 更新节点高度
if (this.node.width - this.label.getLastStringLenght() >= 170 - 48) {
this.record.getComponent(cc.Widget).enabled = false;
this.record_click.getComponent(cc.Widget).enabled = false;
this.myrecord.getComponent(cc.Widget).enabled = false;
this.myrecord_play.getComponent(cc.Widget).enabled = false;
this.record.y = 18;
this.record_click.y = 18;
this.myrecord.y = 18;
this.myrecord_play.y = 18;
this.record.x = this.label.getLastStringLenght() + 32;
this.record_click.x = this.label.getLastStringLenght() + 32;
this.myrecord.x = this.label.getLastStringLenght() + 32 + 86;
this.myrecord_play.x = this.label.getLastStringLenght() + 32 + 86;
}
this.stop();
});
}
/**
* 重置所有按钮
*/
reset() {
this.tip.active = false;
this.record.active = true;
this.record_click.active = false;
this.myrecord.active = false;
this.myrecord_play.active = false;
}
/**
* 正在录制声音
*/
recording() {
this._recording = true;
this.record.active = false;
this.record_click.active = true;
}
/**
* 结束录制
*/
recorded() {
this._recording = false;
this.record.active = true;
this.record_click.active = false;
}
getRecording() {
return this._recording;
}
/**
* 未录制音频
*/
hideRecord() {
this._recorded = false;
this.myrecord.active = false;
this.myrecord_play.active = false;
}
/**
* 播放已录制声音
*/
playRecord() {
this._recorded = true;
this.myrecord.active = false;
this.myrecord_play.active = true;
}
/**
* 停止已录制声音
*/
stopRecord() {
this._recorded = true;
this.myrecord.active = true;
this.myrecord_play.active = false;
}
getRecorded() {
return this._recorded;
}
/**
* 正在播放中
*/
playing() {
this.tip.active = true;
this.label.node.color = cc.color(255, 96, 0);
}
/**
* 播放完成
*/
stop() {
this.tip.active = false;
this.label.node.color = cc.color(44, 77, 140);
}
}
{
"ver": "1.0.8",
"uuid": "23ce4337-c8da-486e-adc3-f1ff0822ba3e",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
/*
* @Author: ls
* @Date: 2022-05-15 18:22:18
* @LastEditTime: 2022-05-22 00:13:54
* @LastEditors: ls
* @Description:
* @FilePath: \ls_gramophone\assets\ls_gramophone\script\defaultData.ts
*/
export const defaultData = {
"pic_url": "http://staging-teach.cdn.ireadabc.com/ed94332a503c31e0908bd4c6923a2665.png",
"pic_url_2": "http://staging-teach.cdn.ireadabc.com/5fb60317ade0195d35ad8034d5370a7f.png",
"text": "This is a test label.",
"audio_url": "http://staging-teach.cdn.ireadabc.com/f47f1d7b5c160fe1c59500d180346240.mp3"
}
\ No newline at end of file
title: '标题标题标题标题',
questionText: '题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明题目说明',
questionTextAudio: 'http://staging-teach.cdn.ireadabc.com/92ddbc65e9af775f7a8450a5bef1a732.mp3',
pageImage: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg', // 左边的图片
pageAudio: 'http://staging-teach.cdn.ireadabc.com/c0e467e1950cb24b1e581737a1344cb4.mp3', // 整体音频
sentences: [
{
text: 'Good morning',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Good morning',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how are you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how old are you you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how dare you, Hello, how dare you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how dare you, Hello, how dare you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how dare you, Hello, how dare you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how dare you, Hello, how dare you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
{
text: 'Hello, how dare you, Hello, how dare you',
audio: 'http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3',
},
],
};
This diff is collapsed.
{
"ver": "1.0.8",
"uuid": "998d8f18-8ccd-48ac-9b78-dc13a0f08fd3",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 366,
"height": 336,
"platformSettings": {},
"subMetas": {
"1orange": {
"ver": "1.0.4",
"uuid": "43d1e79d-6de8-4dcb-b8ce-d767df7913aa",
"rawTextureUuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 0,
"trimY": 1,
"width": 366,
"height": 335,
"rawWidth": 366,
"rawHeight": 336,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"ver": "1.1.2",
"uuid": "281e7acb-5fa9-4805-aaaa-2a2a89b4d217",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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