Commit 123441b4 authored by liujiangnan's avatar liujiangnan

Merge branch 'master' of http://vcs.ireadabc.com/template/LWD_3

parents ad05737d 2be3611a
{"ver":"1.1.2","uuid":"551f3197-dce7-4bd2-a290-e784ab1d271a","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": "551f3197-dce7-4bd2-a290-e784ab1d271a",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
......@@ -30,6 +30,27 @@ var game = cc.Class({
default: null,
type: dragonBones.ArmatureDisplay,
displayName: ""
},
btnReStart: {
default: null,
type: cc.Node,
displayName: "重新开始按钮"
},
nodCircle: {
default: null,
type: cc.Node,
displayName: "光圈"
},
handTip: {
default: null,
type: cc.Node,
displayName: "重新开始按钮"
},
nodMask: {
default: null,
type: cc.Node,
displayName: "遮罩"
}
},
......@@ -43,19 +64,19 @@ var game = cc.Class({
// 生命周期 onLoad
onLoad() {
//初始化游戏
this.initGame();
//监听尺寸变化
if (window.addEventListener) {
window.addEventListener('resize', this.scaleEventCallBack, false)
} else if (window.attachEvent) {
window.attachEvent('resize', this.scaleEventCallBack, false)
}
this.initGame()
// //监听尺寸变化
// if (window.addEventListener) {
// window.addEventListener('resize', this.scaleEventCallBack, false)
// } else if (window.attachEvent) {
// window.attachEvent('resize', this.scaleEventCallBack, false)
// }
},
//屏幕缩放
scaleEventCallBack: function () {
LWD_3.event_mgr.send("adjustUI");
// LWD_3.event_mgr.send("adjustUI");
},
//初始化游戏
......@@ -76,8 +97,8 @@ var game = cc.Class({
// 求出 ScrollView 可视区域在世界坐标系中的矩形(碰撞盒)
let svBBoxRect = cc.rect(
svLeftBottomPoint.x - 300,
svLeftBottomPoint.y - 500,
svLeftBottomPoint.x,
svLeftBottomPoint.y,
node.width,
node.height
);
......@@ -85,18 +106,6 @@ var game = cc.Class({
return svBBoxRect
},
//检查当前缩放倍数
checkScale: function (num) {
var scale = 1;
if (num > 2 && num <= 4) {
scale = 0.74
}
if (num > 4) {
scale = 0.65
}
return scale;
},
//添加节点
addItem: function () {
......@@ -122,26 +131,12 @@ var game = cc.Class({
};
},
//五秒没操作
hintPlay: function () {
// this.playLionDragon("openmouth")
this.playCatDragon("begin")
LWD_3.speaker.inst.playEffect(LWD_3.enum.E_Audio.CatHint);
for (var i = 0; i < this.contentArr.childrenCount; i++) {
cc.tween(this.contentArr.children[i].children[0])
.to(0.1, { x: -50 })
.to(0.1, { x: 0 })
.to(0.1, { x: 50 })
.to(0.1, { x: 0 })
.start();
}
},
//隐藏剩余物品并跳转下一题
resetQues: function () {
if (LWD_3.data_mgr.quesId >= 4) {
this.finish();
this._timeoutIds.push(setTimeout(() => {
this.finish();
}, 1000));
LWD_3.data_mgr.gameState = 2
} else {
for (var i = 0; i < this.contentArr.childrenCount; i++) {
......@@ -152,6 +147,8 @@ var game = cc.Class({
this._timeoutIds.push(setTimeout(() => {
this.UpdataUi();
//播放题干
this.playAudioTitle();
}, 1000));
}
},
......@@ -160,36 +157,33 @@ var game = cc.Class({
finish() {
this.playLionDragon("normal")
this.playCatDragon("finish")
this._timeoutIds.push(setTimeout(() => {
LWD_3.speaker.inst.playEffect(LWD_3.enum.E_Audio.CatComplete);
// TODO 结束游戏,上报成绩
onHomeworkFinish();
}, 500));
},
//检测放到哪个节点底下
checkNodeParent: function () {
//获取到总列表
var itemArr = LWD_3.data_mgr.getSheepArr();
//
if (itemArr.length <= 7) {
var idx = 1;
} else {
var idx = 0;
}
return idx;
//播放引导音频
let path = LWD_3.data_mgr.getAudioEnd();
if (path == -1) return this.showRestartBtn();
LWD_3.res_mgr.playAudioByUrl(path, (url) => {
LWD_3.snd_mgr.playEffect(url, () => {
this.showRestartBtn();
// TODO 结束游戏,上报成绩
onHomeworkFinish();
})
})
},
//检查类别
checkType: function (Id) {
for (var i in LWD_3.data_mgr.getSheepfoldArr()) {
var sheepfoldInfo = LWD_3.data_mgr.getSheepfoldArr()[i];
if (Id == sheepfoldInfo.id) {
return ~~i + 1;
}
}
return -1;
//开始引导游戏
guideGame: function () {
this.UpdataUi();
this.playCatDragon("begin");
//播放引导音频
let path = LWD_3.data_mgr.getAudioBegin();
if (path == -1) return this.nodMask.active = false;
LWD_3.res_mgr.playAudioByUrl(path, (url) => {
LWD_3.snd_mgr.playEffect(url, () => {
this.nodMask.active = false;
//播放题干
this.playAudioTitle();
})
})
},
//更新界面信息
......@@ -208,18 +202,13 @@ var game = cc.Class({
this.playCatDragon("begin");
this.playLionDragon("normal");
//播放题干
this.playAudioTitle();
// LWD_3.speaker.inst.playEffect(E_Audio.BtnCommom);
// //播放题干
// this.playAudioTitle();
//重置UI界面
this.resetUI();
//添加项
this.addItem();
// //设置上下页按钮状态
// this.setButtonState();
},
//播放猫动画
......@@ -230,19 +219,48 @@ var game = cc.Class({
//播放猫动画
playLionDragon(name) {
this.dragonLion.armatureName = "armatureName";
this.dragonLion.armatureName = "Armature";
this.dragonLion.playAnimation(name);
},
//点击猫猫
onBtnCheckCat: function () {
if (this._isSpeak) return;
//判断当前状态
if (LWD_3.data_mgr.quesId < 4) {
this._isSpeak = true;
this.playCatDragon("begin");
this.playAudioTitle(() => {
this._isSpeak = false;
this.playCatDragon("normal");
});
}
//如果结束了则提示音
if (this.btnReStart.active) {
let path = LWD_3.data_mgr.getAudioReStart();
if (path == -1) return;
this._isSpeak = true
this.playCatDragon("begin");
LWD_3.res_mgr.playAudioByUrl(path, (url) => {
LWD_3.snd_mgr.playEffect(url, () => {
this._isSpeak = false;
this.playCatDragon("normal");
})
});
}
},
//播放题干
playAudioTitle: function () {
if (LWD_3.data_mgr.quesId >= 4) return
//获得播放路径
playAudioTitle: function (cb) {
var path = LWD_3.data_mgr.getQuestionStem(LWD_3.data_mgr.quesId);
if (LWD_3.data_mgr.quesId >= 4 || !path) return
//获得播放路径
LWD_3.res_mgr.playAudioByUrl(path, (url) => {
LWD_3.snd_mgr.playEffect(url, () => {
//结束回调
this.playCatDragon("normal");
cb && cb();
});
});
},
......@@ -253,16 +271,6 @@ var game = cc.Class({
this.contentArr.removeAllChildren();
},
//重新开始
onBtnReStart: function () {
LWD_3.speaker.inst.play_btn();
//移除所有计时器
this.unscheduleAllCallbacks();
//初始化界面
this.UpdataUi();
LWD_3.speaker.inst.play_restart();
},
//游戏开始
gameStart: function () {
console.log("游戏开始:" + LWD_3.data_mgr);
......@@ -270,69 +278,61 @@ var game = cc.Class({
this.setAudioInfo(1);
},
//设置上下页按钮状态
setButtonState: function () {
//先判断题目长度
if (LWD_3.data_mgr.data.contentObj.pageArr.length < 2) {
this.btnList[0].node.active = false;
this.btnList[1].node.active = false;
} else {
//如果第一页
if (LWD_3.data_mgr.pageId == 0) {
this.btnList[1].node.active = true;
this.btnList[0].node.active = false;
}
if (LWD_3.data_mgr.pageId == LWD_3.data_mgr.data.contentObj.pageArr.length - 1) {
this.btnList[0].node.active = true;
this.btnList[1].node.active = false;
}
if (LWD_3.data_mgr.pageId > 0 && LWD_3.data_mgr.pageId < LWD_3.data_mgr.data.contentObj.pageArr.length - 1) {
this.btnList[0].node.active = true;
this.btnList[1].node.active = true;
}
}
},
//下一关
onBtnNextQues: function () {
LWD_3.data_mgr.time = 0;
LWD_3.speaker.inst.playEffect(LWD_3.enum.E_Audio.BtnCommom);
LWD_3.data_mgr.quesId += 1;
LWD_3.game.inst.resetQues();
},
//重新开始
onBtnReStart() {
LWD_3.data_mgr.time = 0;
LWD_3.data_mgr.resetQuestion();
//隐藏节点
this.btnReStart.active = false;
//播放音效
LWD_3.speaker.inst.playEffect(LWD_3.enum.E_Audio.BtnCommom);
//数据重置
LWD_3.data_mgr.quesId = 0;
//更新界面
this.UpdataUi();
},
//上一关
onBtnLastPage: function () {
LWD_3.speaker.inst.play_btn();
//播放题干
this.playAudioTitle();
if (LWD_3.data_mgr.pageId - 1 >= 0) {
LWD_3.data_mgr.pageId -= 1;
this.setButtonState();
this.onBtnReStart();
}
this.hideRestartBtn();
},
//下一关
onBtnNextPage: function () {
LWD_3.speaker.inst.play_btn();
//手势移动
setHandTip(node) {
//传入当前点击的节点坐标,移动至中心点
var beginPos = cc.v2(node.x, node.y + this.contentArr.y);
//50偏移量到嘴巴
var EndPos = cc.v2(this.dragonLion.node.x, this.dragonLion.node.y);
this.handTween && this.handTween.stop();
this.handTween = cc.tween(this.handTip)
.call(() => {
this.handTip.active = true;
this.handTip.x = beginPos.x;
this.handTip.y = beginPos.y;
})
.to(1.5, { x: EndPos.x, y: EndPos.y })
.call(() => {
this.handTip.active = false;
})
.union()
.repeat(2) // 执行2次
.start();
},
if (LWD_3.data_mgr.pageId + 1 < LWD_3.data_mgr.data.contentObj.pageArr.length) {
LWD_3.data_mgr.pageId += 1;
this.setButtonState();
this.onBtnReStart();
}
showRestartBtn() {
this.btnReStart.active = true;
cc.tween(this.nodCircle)
.set({ scale: 0.8, opacity: 255 })
.to(2, { scale: 1.2, opacity: 0 })
.union()
.repeatForever()
.start();
},
hideRestartBtn() {
this.nodCircle.stopAllActions();
this.nodCircle.scale = 0.8;
this.nodCircle.opacity = 255;
},
_timeoutIds: null,
_intervalIds: null,
// 生命周期
......
const WIDTH = 2176;
const HEIGTH = 1600;
const WIDTH = 1280;
const HEIGTH = 720;
/**
* 适配
......@@ -8,16 +8,6 @@ cc.Class({
extends: cc.Component,
properties: {
UIMax: {
default: [],
type: cc.Node,
displayName: "等比放大"
},
topUI: {
default: [],
type: cc.Widget,
},
bgScaleMax: {
default: [],
type: cc.Node,
......@@ -43,24 +33,24 @@ cc.Class({
onLoad: function () { //开启适配
this.widgetList = [];
this.initSize();
this.scheduleOnce(function () {
if (!this.isCanvas) {
this.init();
} else {
var canvaSize = this.findCanvas();
var w = (canvaSize.width) / HEIGTH;
var h = (canvaSize.height) / WIDTH;
this.MaxSize = w / h > 1 ? w / h : h / w;
// var canvaSize = this.findCanvas();
// var w = (canvaSize.width) / HEIGTH;
// var h = (canvaSize.height) / WIDTH;
this.MaxSize = 1 //w / h > 1 ? w / h : h / w;
this.setUIMax(this.MaxSize);
this.settopUI(this.MaxSize);
this.setBgScale();
this.setUiPositon();
var scene = cc.director.getScene();
var list = scene.getComponentsInChildren(cc.Widget)
for (var i in list) {
list[i].updateAlignment();
// list[i].updateAlignment();
}
}
}, 0);
......@@ -71,33 +61,59 @@ cc.Class({
});
this.MaxSize = 1;
},
initSize() {
// 注意cc.winSize只有在适配后(修改fitHeight/fitWidth后)才能获取到正确的值,因此使用cc.getFrameSize()来获取初始的屏幕大小
let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height
let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height
let f = screen_size >= design_size
cc.Canvas.instance.fitHeight = f
cc.Canvas.instance.fitWidth = !f
const frameSize = cc.view.getFrameSize();
this._frameSize = frameSize;
this._designSize = cc.view.getDesignResolutionSize();
let sx = cc.winSize.width / frameSize.width;
let sy = cc.winSize.height / frameSize.height;
this._cocosScale = Math.min(sx, sy);
sx = frameSize.width / this._designSize.width;
sy = frameSize.height / this._designSize.height;
this._mapScaleMin = Math.min(sx, sy) * this._cocosScale;
this._mapScaleMax = Math.max(sx, sy) * this._cocosScale;
this.canvas = cc.find("Canvas");
},
init: function () {
var canvaSize = this.findCanvas();
var diff = canvaSize.width / canvaSize.height;
var bili = WIDTH / HEIGTH;
if (diff > bili) {
this.canvasView.fitWidth = false;
this.canvasView.fitHeight = true;
} else if (diff < bili) {
this.canvasView.fitWidth = true;
this.canvasView.fitHeight = false;
} else {
this.canvasView.fitWidth = true;
this.canvasView.fitHeight = true;
}
var w = (canvaSize.width) / WIDTH;
var h = (canvaSize.height) / HEIGTH;
this.MaxSize = w / h > 1 ? w / h : h / w;
// var canvaSize = this.findCanvas();
// var diff = canvaSize.width / canvaSize.height;
// var bili = WIDTH / HEIGTH;
// if (diff > bili) {
// this.canvasView.fitWidth = false;
// this.canvasView.fitHeight = true;
// } else if (diff < bili) {
// this.canvasView.fitWidth = true;
// this.canvasView.fitHeight = false;
// } else {
// this.canvasView.fitWidth = true;
// this.canvasView.fitHeight = true;
// }
// var w = (canvaSize.width) / WIDTH;
// var h = (canvaSize.height) / HEIGTH;
this.MaxSize = 1 // w / h > 1 ? w / h : h / w;
LWD_3.data_mgr.MaxSize = this.MaxSize;
this.setUIMax(this.MaxSize);
this.settopUI(this.MaxSize);
this.setBgScale();
this.setUiPositon();
var scene = cc.director.getScene();
var list = scene.getComponentsInChildren(cc.Widget)
for (var i in list) {
list[i].updateAlignment();
// list[i].updateAlignment();
}
},
......@@ -106,26 +122,17 @@ cc.Class({
LWD_3.event_pump.unReg("adjustUI");
}
},
settopUI: function (s) {
if (!LWD_3.data_mgr.phoneInfo) {
return;
}
var top = LWD_3.data_mgr.phoneInfo;
top = top * s;
for (var i in this.topUI) {
if (this.topUI[i].perTop == undefined) {
this.topUI[i].perTop = this.topUI[i].top;
} else {
this.topUI[i].top = this.topUI[i].perTop;
}
this.topUI[i].top += top;
console.log(this.topUI[i].top);
}
},
//背景适配
setBgScale: function () {
const bg = cc.find('Canvas/bg');
bg.scale = this._mapScaleMax;
const grass = cc.find('Canvas/connent/bg_grass');
grass.scaleX = this.canvas.width / grass.width;
return;
for (var i in this.bgScaleMax) {
// 1. 先找到 SHOW_ALL 模式适配之后,本节点的实际宽高以及初始缩放值
let scaleForShowAll = Math.min(
......@@ -160,19 +167,6 @@ cc.Class({
}
},
setUIMax: function (size) {
for (var i in this.UIMax) {
if (this.UIMax[i].perScale == undefined) {
this.UIMax[i].perScale = this.UIMax[i].scaleX;
} else {
this.UIMax[i].scaleX = this.UIMax[i].perScale;
this.UIMax[i].scaleY = this.UIMax[i].perScale;
}
this.UIMax[i].scaleX *= size;
this.UIMax[i].scaleY *= size;
}
},
findCanvas: function () {
if (cc.sys.isNative) {
return {
......
//手势移动
cc.Class({
extends: cc.Component,
properties: {
},
start() {
},
});
{
"ver": "1.0.8",
"uuid": "3965d960-0cbf-4158-af67-3ddc4ae03225",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -23,6 +23,7 @@ cc.Class({
start: function () {
this._timeoutIds = [];
this._intervalIds = [];
this.handTip = 0;//手势提示次数
this.node.on(cc.Node.EventType.TOUCH_START, this.touchBegan, this);
this.node.on(cc.Node.EventType.TOUCH_MOVE, this.touchMove, this);
this.node.on(cc.Node.EventType.TOUCH_END, this.touchEnd, this);
......@@ -35,8 +36,11 @@ cc.Class({
LWD_3.data_mgr.gameState = 2;
LWD_3.data_mgr.time = 0;
//如果有提示手则停止
LWD_3.game.inst.handTween && LWD_3.game.inst.handTween.stop() && (LWD_3.game.inst.handTip.active = false);
//狮子猫动画
LWD_3.game.inst.playLionDragon("openmouth");
LWD_3.game.inst.playLionDragon("waiting");
LWD_3.res_mgr.playAudioByUrl(this.itemInfo.audio_url, (url) => {
LWD_3.snd_mgr.playEffect(url, null);
......@@ -89,7 +93,11 @@ cc.Class({
if (!this.isMove) {
cc.log("点击了");
// this.onBtnRotate();
this.handTip += 1;
if (this.handTip >= 2) {
LWD_3.game.inst.setHandTip(this.node.parent);
this.handTip = 0;
}
//回到原来的位置
this.node.x = 0;
this.node.y = 0;
......@@ -102,8 +110,8 @@ cc.Class({
// 获取 ScrollView Node 的左下角坐标在世界坐标系中的坐标
let svLeftBottomPoint = this.node.parent.convertToWorldSpaceAR(
cc.v2(
this.node.x - this.node.anchorX * this.node.width,
this.node.y - this.node.anchorY * this.node.height
this.node.x,
this.node.y
)
);
......@@ -124,6 +132,7 @@ cc.Class({
this.errorEffect();
}
} else {
this.handTip += 1;
this.errorEffect();
}
},
......@@ -134,7 +143,7 @@ cc.Class({
LWD_3.data_mgr.nowNum -= 1;
//狮子猫动画
LWD_3.game.inst.playLionDragon("chew");
LWD_3.game.inst.playLionDragon("right");
//先播放错误声音
LWD_3.speaker.inst.playEffect(LWD_3.enum.E_Audio.Right);
......@@ -178,7 +187,7 @@ cc.Class({
errorEffect: function () {
//狮子猫动画
LWD_3.game.inst.playCatDragon("wrong");
LWD_3.game.inst.playLionDragon("no");
LWD_3.game.inst.playLionDragon("wrong");
//先播放错误声音
LWD_3.speaker.inst.playEffect(LWD_3.enum.E_Audio.Error);
......@@ -201,6 +210,10 @@ cc.Class({
});
LWD_3.game.inst.playCatDragon("wrong");
LWD_3.game.inst.playLionDragon("normal");
if (this.handTip >= 2) {
LWD_3.game.inst.setHandTip(this.node.parent);
this.handTip = 0;
}
}, 500));
},
......@@ -266,7 +279,7 @@ cc.Class({
//图片适配
photoScare: function (node, type) {
var maxNum = type == 0 ? 50 : 280;
var maxNum = type == 0 ? 50 : 200;
let maxSize = Math.min(maxNum / node.height, maxNum / node.width);
if (node.perScale == undefined) {
node.perScale = node.scaleX;
......
......@@ -16,21 +16,6 @@ var E_Audio = {
Error: 9,
}
// var E_lion = {
// normal= "normal",
// no = "no",
// chew = "chew",
// openmouth = "openmouth"
// }
// var E_cat = {
// begin = "begin",
// right = "right",
// normal= "normal",
// wrong = "wrong",
// finish = "finish"
// }
var speaker = cc.Class({
extends: cc.Component,
......@@ -40,57 +25,6 @@ var speaker = cc.Class({
type: cc.AudioClip,
displayName: "音效列表"
},
// eff_allPop: {
// default: null,
// type: cc.AudioClip,
// displayName: "全部弹出"
// },
// eff_btn: {
// default: null,
// type: cc.AudioClip,
// displayName: "点击音效"
// },
// eff_right: {
// default: null,
// type: cc.AudioClip,
// displayName: "正确音效"
// },
// eff_catComplete: {
// default: null,
// type: cc.AudioClip,
// displayName: "猫完成"
// },
// eff_catHint: {
// default: null,
// type: cc.AudioClip,
// displayName: "猫提示"
// },
// eff_catRight1: {
// default: null,
// type: cc.AudioClip,
// displayName: "猫正确1"
// },
// eff_catRight2: {
// default: null,
// type: cc.AudioClip,
// displayName: "猫正确2"
// },
// eff_catError1: {
// default: null,
// type: cc.AudioClip,
// displayName: "猫错误1"
// },
// eff_catError2: {
// default: null,
// type: cc.AudioClip,
// displayName: "猫错误2"
// },
},
ctor: function () {
......@@ -104,40 +38,4 @@ var speaker = cc.Class({
LWD_3.snd_mgr.playEffect(this.eff_audio[num], cb);
},
// //点击按钮
// play_btn: function () {
// LWD_3.snd_mgr.playEffect(this.eff_btn);
// },
// //撒花音效
// play_congratulation: function () {
// LWD_3.snd_mgr.playEffect(this.eff_congratulation);
// },
// //答错
// play_error: function () {
// LWD_3.snd_mgr.playEffect(this.eff_error);
// },
// //答对
// play_good: function (cb) {
// LWD_3.snd_mgr.playEffect(this.eff_good, cb);
// },
// //显示弹窗
// play_showPop: function () {
// LWD_3.snd_mgr.playEffect(this.eff_showPop);
// },
// //游戏开始
// play_start: function (cb) {
// LWD_3.snd_mgr.playEffect(this.eff_start, cb);
// },
// //拉开窗帘
// play_open: function () {
// LWD_3.snd_mgr.playEffect(this.eff_open);
// },
// //重新开始
// play_restart: function () {
// LWD_3.snd_mgr.playEffect(this.eff_restart);
// },
});
......@@ -7,7 +7,6 @@ LWD_3.data_mgr = {
nowNum: 0,//剩余正确数量
gameState: 2,//游戏状态1可操作 2不可操作
time: 0,
//获得默认数据
getDefaultData() {
......@@ -37,12 +36,15 @@ LWD_3.data_mgr = {
{ "pic_url": "http://staging-teach.cdn.ireadabc.com/3134325b66d1b8ecf2f83db853195da5.png", "audio_url": "http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3", "is_right": true, "text": "a" },
{ "pic_url": "http://staging-teach.cdn.ireadabc.com/3134325b66d1b8ecf2f83db853195da5.png", "audio_url": "http://staging-teach.cdn.ireadabc.com/58eec304909298176bde6c408c9dac1b.mp3", "is_right": false, "text": "b" }]
}],
"ske_json": "http://staging-teach.cdn.ireadabc.com/7355648029551e6848a2cf36ea8a6ba6.json",
"ske_json_name": "lion_ske.json",
"tex_json": "http://staging-teach.cdn.ireadabc.com/511fe163f2df10925e3da82f0f69590b.json",
"tex_json_name": "lion_tex.json",
"tex_png": "http://staging-teach.cdn.ireadabc.com/2fd2a53fcb36d36281a6ded9500dd54f.png",
"tex_png_name": "lion_tex.png"
"ske_json": "http://staging-teach.cdn.ireadabc.com/343192141e9dfca91571a7208c68d365.json",
"ske_json_name": "queen_ske.json",
"tex_json": "http://staging-teach.cdn.ireadabc.com/e53670138a8dc28727528948bffe0854.json",
"tex_json_name": "queen_tex.json",
"tex_png": "http://staging-teach.cdn.ireadabc.com/9bde7212f4aa705a52e73a23d2902023.png",
"tex_png_name": "queen_tex.png",
"guideBegin_audio_url": "http://staging-teach.cdn.ireadabc.com/bd6e2b3a870ef3f9ee9ad9c0fda79228.mp3",
"guideEnd_audio_url": "http://staging-teach.cdn.ireadabc.com/bd6e2b3a870ef3f9ee9ad9c0fda79228.mp3",
"guideRestart_audio_url": "http://staging-teach.cdn.ireadabc.com/bd6e2b3a870ef3f9ee9ad9c0fda79228.mp3",
}
const data = dataJson;
// const data = JSON.parse(dataJson);
......@@ -50,6 +52,19 @@ LWD_3.data_mgr = {
return data;
},
getAudioBegin() {
if (!this.data.guideBegin_audio_url) return -1;
return this.data.guideBegin_audio_url;
},
getAudioEnd() {
if (!this.data.guideEnd_audio_url) return -1;
return this.data.guideEnd_audio_url
},
getAudioReStart() {
if (!this.data.guideRestart_audio_url) return -1;
return this.data.guideRestart_audio_url
},
//数据处理
resetQuestion() {
for (var i in this.data.question_arr) {
......@@ -149,21 +164,7 @@ LWD_3.data_mgr = {
loadEnd() {
//更新游戏界面信息
LWD_3.game.inst.UpdataUi();
clearInterval(this.timer)
this.timer = setInterval(() => {
if (LWD_3.data_mgr.gameState == 2) {
return;
}
LWD_3.data_mgr.time += 1;
if (LWD_3.data_mgr.time >= 10) {
LWD_3.data_mgr.time = 0;
LWD_3.game.inst.hintPlay();
}
}, 1000)
LWD_3.game.inst._intervalIds.push(this.timer);
LWD_3.game.inst.guideGame();
LWD_3.game.inst.isLoadEnd = true;
},
}
\ No newline at end of file
assets/LWD_3/textures/bg_back.png

152 KB | W: | H:

assets/LWD_3/textures/bg_back.png

141 KB | W: | H:

assets/LWD_3/textures/bg_back.png
assets/LWD_3/textures/bg_back.png
assets/LWD_3/textures/bg_back.png
assets/LWD_3/textures/bg_back.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -22,10 +22,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2176,
"height": 1600,
"rawWidth": 2176,
"rawHeight": 1600,
"width": 1280,
"height": 720,
"rawWidth": 1280,
"rawHeight": 720,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "405ffc19-1281-4e7b-94b4-d3e545448c7c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 409,
"height": 409,
"platformSettings": {},
"subMetas": {
"bg_circle": {
"ver": "1.0.4",
"uuid": "34014b86-5854-4b25-81a5-7f74c9241368",
"rawTextureUuid": "405ffc19-1281-4e7b-94b4-d3e545448c7c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 409,
"height": 409,
"rawWidth": 409,
"rawHeight": 409,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -22,10 +22,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2176,
"height": 950,
"rawWidth": 2176,
"rawHeight": 950,
"width": 1280,
"height": 465,
"rawWidth": 1280,
"rawHeight": 465,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "2d128bd0-c993-40d4-88bb-6272f67864e1",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 262,
"height": 268,
"platformSettings": {},
"subMetas": {
"btn_restart": {
"ver": "1.0.4",
"uuid": "2b74a4ab-b3be-4c0d-b986-b99ec48ea911",
"rawTextureUuid": "2d128bd0-c993-40d4-88bb-6272f67864e1",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 262,
"height": 268,
"rawWidth": 262,
"rawHeight": 268,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "b928bd5f-c95f-4f22-ae3e-a3fa57b0c85f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 142,
"height": 160,
"platformSettings": {},
"subMetas": {
"icon_hand": {
"ver": "1.0.4",
"uuid": "5bb2bddc-57f4-49fc-9ab4-0d4583cb903b",
"rawTextureUuid": "b928bd5f-c95f-4f22-ae3e-a3fa57b0c85f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 142,
"height": 160,
"rawWidth": 142,
"rawHeight": 160,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
<div class="model-content">
<div style="padding: 10px;">
<span>开始引导音频: </span>
<app-audio-recorder [audioUrl]="item.guideBegin_audio_url"
(audioUploaded)="onAudioUploadSuccess($event, 'guideBegin_audio_url', item)"></app-audio-recorder>
<span>结束猫猫音频: </span>
<app-audio-recorder [audioUrl]="item.guideEnd_audio_url"
(audioUploaded)="onAudioUploadSuccess($event, 'guideEnd_audio_url', item)"></app-audio-recorder>
<span>点击猫猫提示重新开始音频: </span>
<app-audio-recorder [audioUrl]="item.guideRestart_audio_url"
(audioUploaded)="onAudioUploadSuccess($event, 'guideRestart_audio_url', item)"></app-audio-recorder>
<div style="display: flex 1;margin-bottom: 10px;margin-left: 10px;">
<span>上传 ske_json 文件</span><span> : </span>
<nz-upload nzAccept=".json" [nzAction]="uploadUrl" [nzData]="uploadData" [nzShowUploadList]="false"
......
......@@ -19,8 +19,8 @@
"3D Particle"
],
"preview-port": 7456,
"design-resolution-width": 2176,
"design-resolution-height": 1600,
"design-resolution-width": 1280,
"design-resolution-height": 720,
"fit-width": false,
"fit-height": true,
"use-project-simulator-setting": false,
......
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