Commit 322afc4b authored by 李维's avatar 李维

添加绘图板组件

parent 26448006
{"ver":"1.1.2","uuid":"4a264b41-d3f3-4d83-b022-2e4b42fc601b","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "4a264b41-d3f3-4d83-b022-2e4b42fc601b",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "f6d0a49a-1908-45ef-be3f-58d97e6485bf",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.2.9",
"uuid": "6042751a-2c97-4cba-8feb-d1917e67a74b",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.0.8",
"uuid": "78cab495-9a5f-4e49-840e-3a4242dc3831",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "5ed0a722-cfee-4194-82b1-46c0bd675d68",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2831ad9e-32e2-488e-9801-4fe5d83ee32e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 200,
"height": 200,
"platformSettings": {},
"subMetas": {
"dot_rect": {
"ver": "1.0.4",
"uuid": "0a7607af-89c0-48bc-9205-07f782c143ef",
"rawTextureUuid": "2831ad9e-32e2-488e-9801-4fe5d83ee32e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 200,
"height": 200,
"rawWidth": 200,
"rawHeight": 200,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "49bcaeb3-9863-41b5-ac66-223e466b075d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 128,
"height": 128,
"platformSettings": {},
"subMetas": {
"temp_ palette": {
"ver": "1.0.4",
"uuid": "2de09158-3a6c-4753-8fa7-d9b0f000323c",
"rawTextureUuid": "49bcaeb3-9863-41b5-ac66-223e466b075d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -2.5,
"offsetY": -2.5,
"trimX": 6,
"trimY": 20,
"width": 111,
"height": 93,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "4c0c51f0-10f0-4eb8-9c0a-ab49d6852f69",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 128,
"height": 128,
"platformSettings": {},
"subMetas": {
"temp_btn_color": {
"ver": "1.0.4",
"uuid": "36a33182-e820-4774-88ad-8f483250cc86",
"rawTextureUuid": "4c0c51f0-10f0-4eb8-9c0a-ab49d6852f69",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 8,
"trimY": 8,
"width": 112,
"height": 112,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "29218d98-d42d-43ad-8e72-248f9226c6e4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 128,
"height": 128,
"platformSettings": {},
"subMetas": {
"temp_close": {
"ver": "1.0.4",
"uuid": "68c08781-4d89-4fa8-9c48-75a53c5ab4bc",
"rawTextureUuid": "29218d98-d42d-43ad-8e72-248f9226c6e4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 5,
"trimY": 5,
"width": 118,
"height": 118,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a41a950f-b025-4a64-913e-3258d6627b3c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 128,
"height": 128,
"platformSettings": {},
"subMetas": {
"temp_eraser": {
"ver": "1.0.4",
"uuid": "c4a63cbc-bcd0-4b60-ac1b-23d9a654915a",
"rawTextureUuid": "a41a950f-b025-4a64-913e-3258d6627b3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 3.5,
"offsetY": 1,
"trimX": 25,
"trimY": 16,
"width": 85,
"height": 94,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "672bfa7c-d90b-4410-99ec-9086a6a56f3b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 152,
"height": 128,
"platformSettings": {},
"subMetas": {
"temp_pencil": {
"ver": "1.0.4",
"uuid": "2ae2c683-1b07-464c-9357-d143722f5113",
"rawTextureUuid": "672bfa7c-d90b-4410-99ec-9086a6a56f3b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"trimY": 1,
"width": 150,
"height": 126,
"rawWidth": 152,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -7,8 +7,8 @@
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 157,
"height": 157,
"width": 91,
"height": 91,
"platformSettings": {},
"subMetas": {
"btn_pause": {
......
This diff is collapsed.
......@@ -68,6 +68,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
@property({type: cc.Node, displayName: "视频进度控制条"})
videoControlBar: cc.Node = null;
@property({type: cc.Node, displayName: "画图板模板"})
drawingBoardTemplate: cc.Node = null;
addPreloadImage() {
// TODO 根据自己的配置预加载图片资源
if(this.data.bgItem.url) {
......@@ -2543,12 +2546,30 @@ export default class SceneComponent extends MyCocosSceneComponent {
})
};
// 画图计数,用于同时打开多个画图板控制页面滚动的
drawingCount = 0;
// 画图题
setDrawingArea(contentData, hotZoneItemData, debugMode=false) {
const rect = this.newRectNode(hotZoneItemData, layer_4, debugMode);
const drawingBoard = cc.instantiate(this.drawingBoardTemplate);
drawingBoard.width = rect.width;
drawingBoard.height = rect.height;
drawingBoard.y = rect.height / 2;
drawingBoard.x = drawingBoard.width / 2;
drawingBoard.active = true;
drawingBoard.on("onPaintingStart", ()=>{
this.drawingCount ++;
if(this.drawingCount == 1) {
this.disableScroll()
}
})
drawingBoard.on("onPaintingEnd", ()=>{
this.drawingCount --;
if(this.drawingCount == 0) {
this.enableScroll();
}
})
rect.addChild(drawingBoard);
};
// 语音评测题型
......@@ -3051,6 +3072,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.allConnectionEndPoints = {};
this.totalScorePanel = null;
this.allCrosswordData = {};
this.currentVideoPlay = null;
this.videoDuration = null;
this.drawingCount = 0;
this.startTimestamp = new Date().getTime();
// 停止当前正在播放的音乐
......
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