Commit 57aa8bf6 authored by 13732208043's avatar 13732208043

茶叶更新

parent 7393d156
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"name": "采茶叶",
"desc": "采茶叶模",
"desc": "采茶叶模左上角0,0点",
"props": {
"versePos": {
"alias": "诗句的起始位置",
......@@ -10,7 +10,7 @@
"verses": {
"alias": "诗句",
"type": "array<string>",
"default": "今朝有酒今朝醉,今宵更有湘江月,找出霏霏满碗花,雨过林霏清石气,秋将山翠入诗心,生怕芳丛鹰嘴芽,老郎封寄谪仙家"
"default": "今宵更有湘江月,照出霏霏满碗花,雨过林霏清石气,秋将山翠入诗心"
},
"verseLabel": {
"alias": "提示语框xys",
......@@ -22,6 +22,16 @@
"type": "array<string>",
"default": "#33628b,#99b1c5"
},
"showFrontImg": {
"alias": "茶叶前景图1显示2隐藏",
"type": "number",
"default": "1"
},
"FrontImgPos": {
"alias": "茶叶前景图位置",
"type": "array<number>",
"default": "0,584"
},
"pickTeaSpeed": {
"alias": "采集茶叶的速度ms",
"type": "number",
......@@ -30,12 +40,12 @@
"basketSvgaPos": {
"alias": "人物的位置",
"type": "array<number>",
"default": "110,420"
"default": "110,410"
},
"addOneSvgaPos": {
"alias": "+1SVGA的位置",
"type": "array<number>",
"default": "70,720"
"default": "0,-100"
},
"pickTeaSvgaPos": {
"alias": "采茶叶SVGA的位置",
......@@ -50,12 +60,12 @@
"handGraspSvgaPos": {
"alias": "手点击SVGA的位置",
"type": "array<number>",
"default": "543,791"
"default": "477,-29"
},
"handGraspMovePos": {
"alias": "手点击移动的位置",
"type": "array<number>",
"default": "460,700"
"default": "372,-145"
},
"progressbarBgImgPos": {
"alias": "进度条底图的位置",
......@@ -65,7 +75,7 @@
"progressbarImgPos": {
"alias": "进度条的位置",
"type": "array<number>",
"default": "-443,4"
"default": "-335,4"
},
"teaStarImgPos": {
"alias": "小茶叶的位置",
......@@ -84,6 +94,12 @@
}
},
"assets": [
{
"name": "前景",
"url": "//yun.duiba.com.cn/aurora/assets/1da0ea14267ff35f90f49c22deb1b34181571e90.png",
"uuid": "9f5db57e-47f9-43e5-af80-adf41299280d",
"ext": ".png"
},
{
"name": "气泡框",
"url": "//yun.duiba.com.cn/aurora/assets/585743f25262b6992ac97015e22d91054d506821.png",
......@@ -98,7 +114,7 @@
},
{
"name": "进度",
"url": "//yun.duiba.com.cn/aurora/assets/047218962662ed238192f211719c109fa107e8e1.png",
"url": "//yun.duiba.com.cn/aurora/assets/afb6b2655838ea955d250663fc535cc166b466e7.png",
"uuid": "23e7861c-75a9-46bd-93f8-2825d4810d31",
"ext": ".png"
},
......@@ -190,22 +206,25 @@
"events": {
"in": {
"event-getchange-TeaNum": {
"alias": "茶叶数量{初始值totalNum,总量nowNum} "
"alias": "茶叶数量{初始值nowNum,总量totalNum,后端时间serverData} "
},
"event-getBasket-Type": {
"alias": "获得篮子类型"
"alias": "获得篮子类型(纸 布 竹 木)0 1 2 3"
},
"event-hand-grasp": {
"alias": "手抓去"
},
"event-getClick-person": {
"alias": "点击人物"
}
},
"out": {
"event-setchange-TeaNum": {
"alias": "",
"alias": "获取茶叶数量{初始值nowNum,总量totalNum,后端时间serverData}",
"data": {}
},
"event-setBasket-Typ": {
"alias": "",
"alias": "获得篮子类型(纸 布 竹 木)0 1 2 3",
"data": {}
}
}
......
This diff is collapsed.
......@@ -32,12 +32,12 @@ export class GameWrapper extends engine.Container {
engine.globalEvent.addEventListener('event-pickTeaGame-init', this.reset, this);
engine.globalEvent.addEventListener('event-hand-grasp', this.handGrasp, this);
engine.globalEvent.addEventListener('event-getClick-person', this.clickPerson, this);
engine.globalEvent.addEventListener('event-getchange-TeaNum', this.setTeaNum, this);
engine.globalEvent.addEventListener('event-getBasket-Type', this.setPickTeaLevel, this);
let gameView = this._gameView = new GameView();
this.addChild(gameView);
}
......@@ -53,7 +53,14 @@ export class GameWrapper extends engine.Container {
injectProps(event.data);
this._gameView.setPickTeaLevel(event.data);
}
handGrasp() {
this._gameView.handGrasp();
}
//点击人物
clickPerson() {
this._gameView.showVerse();
}
reset(event: engine.Event) {
injectProps(event.data);
this._gameView.visible = true;
......@@ -83,9 +90,6 @@ export class GameWrapper extends engine.Container {
this._gameView.visible = false;
}
handGrasp() {
this._gameView.handGrasp();
}
......
/**
* Created by rockyl on 2020-01-21.
*/
const showlog = false;
export function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid);
}
......@@ -11,10 +11,20 @@ export function getTextureByName(name) {
}
export function playSound(name) {
engine.playSound(engine.getAssetByName(name).uuid, {keep: true});
engine.playSound(engine.getAssetByName(name).uuid, { keep: true });
}
export function createSvga(name, anchorName?) {
let inst = new svga.Svga();
inst.source = 'asset://' + engine.getAssetByName(name).uuid;
return inst;
}
export function showLog(abjname, obj?) {
if (showlog) {
console.log(abjname)
if (obj)
console.log(obj)
}
// let inst = new svga.Svga();
// inst.source = 'asset://' + engine.getAssetByName(name).uuid;
// return inst;
}
\ No newline at end of file
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