Commit 17b50018 authored by asdf's avatar asdf

.

parent d442e651
{
"ver": "1.1.2",
"uuid": "055f3c8d-ca18-4e0f-b0cb-68b6077415cf",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
......@@ -19,16 +19,19 @@
"_children": [
{
"__id__": 2
},
{
"__id__": 5
}
],
"_active": true,
"_components": [
{
"__id__": 5
"__id__": 8
}
],
"_prefab": {
"__id__": 6
"__id__": 9
},
"_opacity": 255,
"_color": {
......@@ -184,6 +187,115 @@
"fileId": "25XSXoHURIQpU0uqotp/lF",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 97.87,
"height": 50.4
},
"_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": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "b125237b-1bc1-4ec8-9b7b-60c16e96c5ae"
},
"fileId": "98kpAv+6RPI6x75ze5gWIu",
"sync": false
},
{
"__type__": "c7c4a6NgRBL1LYik/VyDNVL",
"_name": "",
......@@ -200,6 +312,9 @@
"__uuid__": "9f52edb8-ef14-4027-9fb7-547d454c5707"
}
],
"labText": {
"__id__": 6
},
"_id": ""
},
{
......
......@@ -19,16 +19,22 @@
"_children": [
{
"__id__": 2
},
{
"__id__": 5
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 5
"__id__": 11
}
],
"_prefab": {
"__id__": 6
"__id__": 12
},
"_opacity": 255,
"_color": {
......@@ -52,7 +58,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-472.5,
-163.419,
0,
0,
0,
......@@ -79,7 +85,7 @@
},
{
"__type__": "cc.Node",
"_name": "bg_ti1",
"_name": "bg1",
"_objFlags": 0,
"_parent": {
"__id__": 1
......@@ -185,21 +191,238 @@
"sync": false
},
{
"__type__": "801cdfD0CpK6YvSQsE/j3RW",
"__type__": "cc.Node",
"_name": "bg2",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 292,
"height": 112
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-83.751,
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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
"__id__": 5
},
"_enabled": true,
"spfBase": [
"_materials": [
{
"__uuid__": "6c328371-afaf-4845-9bf6-aa1c3751ad71"
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "68b108ed-fe30-4872-97fb-3cff5a8705b6"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__uuid__": "68b108ed-fe30-4872-97fb-3cff5a8705b6"
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "f9d2b752-95ca-42ec-933f-4440d94f83d3"
},
"fileId": "e4VcfkEJZHao9vamxETpHz",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": {
"__id__": 10
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 97.87,
"height": 50.4
},
"_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": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "f9d2b752-95ca-42ec-933f-4440d94f83d3"
},
"fileId": "ffC1AHutlCY58pBBffzzg1",
"sync": false
},
{
"__type__": "801cdfD0CpK6YvSQsE/j3RW",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"nodBg1": {
"__id__": 2
},
"nodBg2": {
"__id__": 5
},
"labText": {
"__id__": 9
},
"_id": ""
},
{
......
......@@ -77,9 +77,6 @@
],
"_active": true,
"_components": [
{
"__id__": 20
},
{
"__id__": 21
},
......@@ -88,6 +85,9 @@
},
{
"__id__": 23
},
{
"__id__": 24
}
],
"_prefab": null,
......@@ -177,7 +177,7 @@
"array": [
0,
0,
220.83647796503186,
356.01221289243585,
0,
0,
0,
......@@ -251,16 +251,16 @@
"__id__": 9
},
{
"__id__": 15
"__id__": 16
},
{
"__id__": 17
"__id__": 18
}
],
"_active": true,
"_components": [
{
"__id__": 19
"__id__": 20
}
],
"_prefab": null,
......@@ -319,7 +319,7 @@
"__id__": 5
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 7
......@@ -421,7 +421,7 @@
},
{
"__type__": "cc.Node",
"_name": "title",
"_name": "$btnTitle",
"_objFlags": 0,
"_parent": {
"__id__": 5
......@@ -434,10 +434,13 @@
"__id__": 12
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 14
},
{
"__id__": 15
}
],
"_prefab": null,
......@@ -451,13 +454,13 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 678,
"height": 74
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
"y": 1
},
"_trs": {
"__type__": "TypedArray",
......@@ -607,7 +610,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 631.48,
"width": 567.73,
"height": 50.4
},
"_anchorPoint": {
......@@ -660,8 +663,8 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "whitch is the whitch is the whitch is the",
"_N$string": "whitch is the whitch is the whitch is the",
"_string": "whitch is the whitch is the whitch is",
"_N$string": "whitch is the whitch is the whitch is",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
......@@ -707,6 +710,76 @@
"_originalHeight": 0,
"_id": "a0MwMoC1pBTYSOVwh+kdS9"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_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": {
"__id__": 9
},
"_id": "afKRzBsXBGEo/JeIlo/HS1"
},
{
"__type__": "cc.Node",
"_name": "$nodQuestionParent",
......@@ -718,7 +791,7 @@
"_active": true,
"_components": [
{
"__id__": 16
"__id__": 17
}
],
"_prefab": null,
......@@ -732,7 +805,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1245,
"width": 920,
"height": 300
},
"_anchorPoint": {
......@@ -774,12 +847,12 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
"__id__": 16
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 1245,
"width": 920,
"height": 300
},
"_resize": 1,
......@@ -794,7 +867,7 @@
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 15,
"_N$spacingX": 10,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
......@@ -812,7 +885,7 @@
"_active": true,
"_components": [
{
"__id__": 18
"__id__": 19
}
],
"_prefab": null,
......@@ -868,7 +941,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
"__id__": 18
},
"_enabled": true,
"_layoutSize": {
......@@ -888,7 +961,7 @@
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 15,
"_N$spacingX": 10,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
......
......@@ -3,6 +3,7 @@ cc.Class({
properties: {
spfBase:[cc.SpriteFrame],
labText:cc.Label,
},
// onLoad () {},
......@@ -11,5 +12,8 @@ cc.Class({
},
setInfo(data,index){
this.labText.string = index;
},
// update (dt) {},
});
......@@ -2,13 +2,18 @@ cc.Class({
extends: cc.Component,
properties: {
spfBase:[cc.SpriteFrame],
nodBg1:cc.Node,
nodBg2:cc.Node,
labText:cc.Label,
},
// onLoad () {},
start () {
},
setInfo(data,index){
this.labText.string = index;
},
// update (dt) {},
});
......@@ -116,22 +116,46 @@ cc.Class({
initData() {
// 所有全局变量 默认都是null
GameData.questionIndex = 0;
this.initQuestionASpace();
this.initQuestionAndAnswer();
this.initTitle();
},
startGame() {
this.playAudioEntrer();
},
initQuestionASpace() {
let optionList = this.data.questionList[GameData.questionIndex].optionList;
if (optionList.length == 3) {
this.nodeDict.nodQuestionParent.getComponent(cc.Layout).spacingX = 56;
this.nodeDict.nodAnswerParent.getComponent(cc.Layout).spacingX = 56;
} else {
this.nodeDict.nodQuestionParent.getComponent(cc.Layout).spacingX = 10;
this.nodeDict.nodAnswerParent.getComponent(cc.Layout).spacingX = 10;
}
},
initTitle() {
let label = this.nodeDict.labTitle.getComponent(cc.Label);
label.string = this.data.questionList[GameData.questionIndex].questionText;
label._forceUpdateRenderData();
if (this.nodeDict.labTitle.width > 567) {
this.nodeDict.labTitle.scale = 567 / this.nodeDict.labTitle.width
}
},
// 初始化题干以及选项
initQuestionAndAnswer() {
let optionList = this.data.questionList[GameData.questionIndex].optionList;
for (let i = 0; i < optionList.length; i++) {
let question = cc.instantiate(this.pfbItemQuestion);
question.parent = this.nodeDict.nodQuestionParent;
question.getComponent('ItemQuestion').setInfo(optionList[i], i);
let answer = cc.instantiate(this.pfbItemAnswer);
answer.parent = this.nodeDict.nodAnswerParent;
answer.getComponent('ItemAnswer').setInfo(optionList[i], i);
}
},
......@@ -166,4 +190,12 @@ cc.Class({
},
buttonListener(button) {
if (button.node.name == 'btnTitle') {
if (!GameData.isAudio) {
this.playAudioQuestion();
}
}
},
});
{
"ver": "2.3.5",
"uuid": "1d37d614-b7cb-4ec6-8cbb-c9d798dc7a14",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 720,
"platformSettings": {},
"subMetas": {
"4-移动到一起后,两个底座消失变成大底座,同时开始播放两个骨骼动画和音频,音频播完一边停止,动画一直循环播放背景星星和月亮亮持续3秒左右)": {
"ver": "1.0.4",
"uuid": "7f9056d6-161e-49a1-877b-17eab0c61558",
"rawTextureUuid": "1d37d614-b7cb-4ec6-8cbb-c9d798dc7a14",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 720,
"rawWidth": 1280,
"rawHeight": 720,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "2.3.5",
"uuid": "b82ca925-2eb6-44aa-b7ce-ff6440cad01a",
"uuid": "b13600b5-1c1d-4ac0-a08c-e5b1c15c4143",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
......@@ -11,10 +11,10 @@
"height": 720,
"platformSettings": {},
"subMetas": {
"1-进入课件,开始自动播放标题音,点击标题重新播放.": {
"7-三道题布局": {
"ver": "1.0.4",
"uuid": "84593abd-b82c-447f-94b1-bc4c20d4b187",
"rawTextureUuid": "b82ca925-2eb6-44aa-b7ce-ff6440cad01a",
"uuid": "4137ea3f-52bc-4e96-95fc-d48662170d82",
"rawTextureUuid": "b13600b5-1c1d-4ac0-a08c-e5b1c15c4143",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......
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