Commit dbff5354 authored by wildfirecode's avatar wildfirecode

1

parent 50061e2d
......@@ -128,7 +128,8 @@
"getNgameStartStatus": "dynamic|API|getNgameStartStatus",
"getOrderStatus": "dynamic|API|getOrderStatus",
"rankbtn": "entity|34f68eec-739c-478c-a527-6aa12c197850",
"countTxt": "entity|1fb25a95-98c0-4f3c-9ae9-e8d4e67adf79"
"countTxt": "entity|1fb25a95-98c0-4f3c-9ae9-e8d4e67adf79",
"box": "entity|47646fc8-e375-41c3-a95c-287ddf6ba798"
},
"disabled": false
},
......@@ -160,61 +161,33 @@
}
},
{
"script": "./scripts/api/SamplePollingApi",
"properties": {
"name": "getNgameStartStatus",
"onError": [
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "onGotError_getNgameStartStatus"
}
],
"onResponse": [
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "onGot_getNgameStartStatus"
}
],
"uri": "/hdtool/recon/ngame/getNgameStartStatus"
}
},
{
"script": "./scripts/api/SamplePollingApi",
"script": "./scripts/api/SampleApi",
"properties": {
"uri": "/hdtool/recon/getOrderStatus",
"name": "rankInfo",
"method": "GET",
"onError": [
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "onError_getOrderStatus"
}
],
"onResponse": [
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "onResponse_getOrderStatus"
"method": "onResponse_rank"
}
],
"name": "getOrderStatus"
"uri": "/customActivity/sjf/activity/rankInfo"
}
},
{
"script": "./scripts/api/SampleApi",
"properties": {
"name": "rankInfo",
"method": "GET",
"name": "rankInfo2",
"uri": "/customActivity/sjf/activity/rankInfo",
"onResponse": [
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "onResponse_rank"
"method": "onResponse_rankInfo2"
}
],
"uri": "/customActivity/sjf/activity/rankInfo"
]
}
}
],
......@@ -258,6 +231,59 @@
"disabled": false,
"children": []
},
{
"name": "box",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 2.857142857142847,
"y": 25.71428571428575
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|072e5812-0898-4d90-a077-3a0c073df00f",
"anchor": {
"x": 0.6,
"y": 0.8,
"_type_": "scilla/support/Vector2D"
}
},
"disabled": false
}
],
"uuid": "47646fc8-e375-41c3-a95c-287ddf6ba798",
"disabled": false,
"children": []
},
{
"name": "noname",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 28.571428571428555,
"y": -2.8571428571428896
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|add607e6-e22c-4e67-9a24-3b147abce03d"
},
"disabled": false
}
],
"uuid": "dbdff233-e3f7-4aa6-9506-be324b33c181",
"disabled": false,
"children": []
},
{
"name": "ruleBtn",
"components": [
......@@ -445,14 +471,14 @@
"properties": {
"position": {
"x": 0,
"y": 145.71428571428572
"y": -434.2857142857143
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(255, 255, 255, 1)",
"fillColor": "rgba(254, 220, 187, 1)",
"text": "啥也没发"
}
}
......@@ -460,7 +486,7 @@
"uuid": "1fb25a95-98c0-4f3c-9ae9-e8d4e67adf79"
}
],
"disabled": true
"disabled": false
},
{
"name": "ScenePlay",
......@@ -795,7 +821,7 @@
}
],
"uuid": "5f2a7508-4728-430b-b306-06f719ea81e3",
"disabled": false,
"disabled": true,
"children": [
{
"name": "cankao",
......@@ -2492,6 +2518,14 @@
{
"name": "rankbtn.png",
"uuid": "66066ff4-4536-4398-84ad-8cf91c2d8333"
},
{
"name": "盒子.png",
"uuid": "072e5812-0898-4d90-a077-3a0c073df00f"
},
{
"name": "装饰.png",
"uuid": "add607e6-e22c-4e67-9a24-3b147abce03d"
}
]
}
......
......@@ -21,26 +21,11 @@ export default class MainController extends ScillaComponent {
initEnv();
this.broadcast('callApi', 1, 'rankInfo', {
weddingId: window['CFG'].weddingId,
activityId: window['CFG'].activityId
})
}
onResponse_rankInfo(data) {
if (data.openPrize) {//开奖了,都是线下奖品
let prize;
window['CFG'].activity.prizeList.forEach(p => {
if (p.rank == data.rank)
prize = p;
});
if (prize) //中奖了
this.showDialog('Prize', prize);
else
this.showDialog('Alert', '您与奖品擦肩而过~');
}
}
// onGotAjaxElement() {
// setTimeout(() => {
// this.broadcast('initGameStage');
......
......@@ -45,10 +45,10 @@ export default class PrizeDialogContent extends DialogContent {
}
async setup(data: any = {}) {
setText(this.name,data.title);
setText(this.name,data.prizeName);
setText(this.title,this.getTypeStr(data.prizeType))
const texRender = this.pic.getComponent(TextureRenderer);
const texture = await this.loadTexture(data.imgurl);
const texture = await this.loadTexture(data.prizeImage);
texRender.texture = texture;
if (texture.bounds.width > texture.bounds.height) {
const maxWidth = 500;
......
......@@ -7,7 +7,7 @@ import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity } from "scilla/src";
import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { setText } from "../transformUtils";
import { setText, setRotation, getRotation } from "../transformUtils";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
doJoin: dynamic;
......@@ -17,11 +17,66 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
startbtn: Entity;
rankbtn: Entity;
rulebtn: Entity;
treeWrapper: Entity;
box: Entity;
private INTERVAL = 3000;
private STREN = 3;
private FREQ = 5;
private SHAK_TIMERS = 10;
private _shakeTimes = -1;
private _counter = -1;
private _lastTime = -1;
onUpdate() {
if (Date.now() - this._lastTime > this.INTERVAL) {
this._lastTime = Date.now();
setRotation(this.box, this.STREN);
this._shakeTimes = this.SHAK_TIMERS;
this._counter = 0;
}
if (this._shakeTimes > 0) {
if (this._counter <= 0) {
this._shakeTimes--;
setRotation(this.box, -getRotation(this.box))
if (this._shakeTimes <= 0) {
setRotation(this.box, 0);
}
this._counter = this.FREQ;
} else {
this._counter--;
}
}
}
onAwake() {
super.onAwake();
this.updateCountTxt();
this.broadcast('callApi', 1, 'rankInfo2', {
weddingId: window['CFG'].weddingId,
activityId: window['CFG'].activityId
});
this._shakeTimes = 0;
this._counter = 0;
this._lastTime = -1;
setRotation(this.box, 0);
}
onResponse_rankInfo2(data) {
if (data.openPrize) {//开奖了,都是线下奖品
let prize;
window['CFG'].activity.prizeList.forEach(p => {
if (p.prizeType == data.prizeType)
prize = p;
});
if (prize) //中奖了
this.bubbling('showDialog', 'Prize', prize);
else
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
}
}
updateCountTxt() {
......
{"ver":"1.0.1","uuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","subMetas":{"rulebtn.png":{"ver":"1.0.1","uuid":"d092293f-6a84-45eb-a7c2-7735b747c2af","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"recordbtn.png":{"ver":"1.0.1","uuid":"7c2aa27c-5cf6-46d0-8509-d9b68052de09","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"startbtn.png":{"ver":"1.0.1","uuid":"65d0864b-a3b8-438b-aa87-673311473c7f","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"rankbtn.png":{"ver":"1.0.1","uuid":"66066ff4-4536-4398-84ad-8cf91c2d8333","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"}},"type":"sheet"}
{"ver":"1.0.1","uuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","subMetas":{"rulebtn.png":{"ver":"1.0.1","uuid":"d092293f-6a84-45eb-a7c2-7735b747c2af","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"recordbtn.png":{"ver":"1.0.1","uuid":"7c2aa27c-5cf6-46d0-8509-d9b68052de09","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"startbtn.png":{"ver":"1.0.1","uuid":"65d0864b-a3b8-438b-aa87-673311473c7f","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"rankbtn.png":{"ver":"1.0.1","uuid":"66066ff4-4536-4398-84ad-8cf91c2d8333","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"盒子.png":{"ver":"1.0.1","uuid":"072e5812-0898-4d90-a077-3a0c073df00f","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"装饰.png":{"ver":"1.0.1","uuid":"add607e6-e22c-4e67-9a24-3b147abce03d","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"}},"type":"sheet"}
assets/singles/bg.jpg

114 KB | W: | H:

assets/singles/bg.jpg

102 KB | W: | H:

assets/singles/bg.jpg
assets/singles/bg.jpg
assets/singles/bg.jpg
assets/singles/bg.jpg
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
This diff is collapsed.
......@@ -21,10 +21,10 @@
<div id="gameContainer" style="width: 100%;height: 100%;overflow: hidden;"></div>
<script src="//yun.duiba.com.cn/db_games/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/security.js"></script>
<script src="//yun.duiba.com.cn/db_games/1561607220/bundle.js"></script>
<script src="//yun.duiba.com.cn/db_games/1561616731/bundle.js"></script>
<script> setTimeout(function () {
var loadingEl = document.getElementById('loading'); function onProcess(p) { if (p >= 1) { loadingEl.style.display = 'none'; } }
var options = { resPath: "//yun.duiba.com.cn/db_games/1561607220/" }; window['shuijf'].startup(document.getElementById('gameContainer'), options, onProcess);
var options = { resPath: "//yun.duiba.com.cn/db_games/1561616731/" }; window['shuijf'].startup(document.getElementById('gameContainer'), options, onProcess);
}, 100);
window['ruleContent'] = 'starttttttt<br>第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行<br>第2行<br>第3行<br>第4行<br>第5行<br>第6行<br>第7行<br>第1行<br>第2行<br>第3行<br>第4行<br>第5行<br>第6行<br>第7行endddddd';
......
......@@ -56,21 +56,7 @@
<script src="./security.js"></script>
<script src="debug/bundle.js"></script>
<script>
var CFG = {
'startTime': 1,
'endTime': 2,
'weddingId': 321,
'freeLimit': 10,
'weixinUid': 00000,
'nickname': 'honingwon',
'activityId':123,
'activity': {
prizeList: [
{ rank: 1, imgurl: '//yun.duiba.com.cn/developer/img/activityTool/slotMachine/alipay.png', prizeType: 1, title: 'title1' },
{ rank: 2, imgurl: '//yun.duiba.com.cn/developer/img/activityTool/slotMachine/alipay.png', prizeType: 2, title: 'title2' }
]
}
};
var CFG = { "startTime": 1561523400000, "endTime": 1561554000000, "weddingId": 1, "freeLimit": 100, "weixinUid": "", "activityId": "3", "nickname": "", "activity": { "activityType": 4, "brickId": 5, "drawStatus": 0, "id": 3, "joinLimit": 100, "prizeList": [{ "activityId": 3, "id": 5, "prizeCount": 5, "prizeImage": "//yun.duiba.com.cn/upload/uP99F1462438316972.png", "prizeName": "喜糖摇摇乐奖品1", "prizeRemain": 0, "prizeType": 1, "weddingId": 1 }, { "activityId": 3, "id": 6, "prizeCount": 5, "prizeImage": "//yun.duiba.com.cn/upload/uP99F1462438316972.png", "prizeName": "喜糖摇摇乐奖品2", "prizeRemain": 1, "prizeType": 2, "weddingId": 1 }], "rankEndTime": 1561550400000, "weddingId": 1 } };
CFG._rule = 'starttttttt<br>第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行<br>第2行<br>第3行<br>第4行<br>第5行<br>第6行<br>第7行<br>第1行<br>第2行<br>第3行<br>第4行<br>第5行<br>第6行<br>第7行endddddd';
......
{
"name": "shuijf",
"engineConfig": {
"fps": 63,
"designWidth": 750,
"designHeight": 1624,
"scaleMode": "fixedWidth",
"modifyCanvasSize": false,
"resPath": ""
},
"customConfig": {
"scene": {
"scenes": {
"main": "scenes/main.scene"
},
"entryScene": "main"
},
"webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010",
"webServiceUrl": "http://localhost:4001",
"webServiceUrl2": "http://localhost:4001"
},
"dataCenterConfig": {
"dataCenterRoot": [
"API",
"CFG"
]
}
}
......@@ -17,7 +17,7 @@
},
"webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010",
"webServiceUrl": "",
"webServiceUrl2": "http://localhost:4001"
"webServiceUrl3": "http://localhost:4001"
},
"dataCenterConfig": {
"dataCenterRoot": [
......
......@@ -2,14 +2,15 @@
"success": true,
"code": null,
"desc": null,
"timestamp": 1561549712114,
"timestamp": 1561615572296,
"data": {
"openPrize": false,
"weiXinUid": "weiXinUid",
"nickName": "nickName",
"avatar": "nickName",
"score": 105,
"rank": "4",
"weiXinUid": null,
"nickName": null,
"avatar": null,
"score": 0,
"rank": "未上榜",
"prizeType": 1,
"list": [
{
"weiXinUid": "weiXinUid",
......
......@@ -5,95 +5,92 @@
import {registerDef} from 'scilla'
import component0 from 'components/other/CameraController';
registerDef('components/other/CameraController', component0);
import component0 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component0);
import component1 from 'components/base/Transform';
registerDef('components/base/Transform', component1);
import component2 from 'components/renderer/TextureRenderer';
registerDef('components/renderer/TextureRenderer', component2);
import component2 from 'components/renderer/HtmlRenderer';
registerDef('components/renderer/HtmlRenderer', component2);
import component3 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component3);
import component3 from 'components/base/TouchInterrupt';
registerDef('components/base/TouchInterrupt', component3);
import component4 from 'components/ui/Button';
registerDef('components/ui/Button', component4);
import component4 from 'components/other/RelativeLayout';
registerDef('components/other/RelativeLayout', component4);
import component5 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextRenderer', component5);
import component5 from 'components/ui/ScrollView';
registerDef('components/ui/ScrollView', component5);
import component6 from 'components/other/FullStageSize';
registerDef('components/other/FullStageSize', component6);
import component7 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component7);
import component7 from 'components/other/CameraController';
registerDef('components/other/CameraController', component7);
import component8 from 'components/ui/ScrollView';
registerDef('components/ui/ScrollView', component8);
import component8 from 'components/renderer/TextureRenderer';
registerDef('components/renderer/TextureRenderer', component8);
import component9 from 'components/other/RelativeLayout';
registerDef('components/other/RelativeLayout', component9);
import component9 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component9);
import component10 from 'components/base/TouchInterrupt';
registerDef('components/base/TouchInterrupt', component10);
import component10 from 'components/ui/Button';
registerDef('components/ui/Button', component10);
import component11 from 'components/renderer/HtmlRenderer';
registerDef('components/renderer/HtmlRenderer', component11);
import component11 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextRenderer', component11);
import component12 from '../../assets/scripts/navigator/SingleSceneNavigator';
registerDef('./scripts/navigator/SingleSceneNavigator', component12);
import component12 from '../../assets/scripts/dialogs/RuleDialogContent';
registerDef('./scripts/dialogs/RuleDialogContent', component12);
import component13 from '../../assets/scripts/scenes/ScenePlay';
registerDef('./scripts/scenes/ScenePlay', component13);
import component14 from '../../assets/scripts/scenes/SceneGuide';
registerDef('./scripts/scenes/SceneGuide', component14);
import component14 from '../../assets/scripts/scenes/SceneResult';
registerDef('./scripts/scenes/SceneResult', component14);
import component15 from '../../assets/scripts/scenes/result/RankItem';
registerDef('./scripts/scenes/result/RankItem', component15);
import component15 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/scenes/SceneStart', component15);
import component16 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/scenes/SceneStart', component16);
import component16 from '../../assets/scripts/navigator/SingleSceneNavigator';
registerDef('./scripts/navigator/SingleSceneNavigator', component16);
import component17 from '../../assets/scripts/api/SamplePollingApi';
registerDef('./scripts/api/SamplePollingApi', component17);
import component17 from '../../assets/scripts/scenes/result/RankList';
registerDef('./scripts/scenes/result/RankList', component17);
import component18 from '../../assets/scripts/scenes/result/RankList';
registerDef('./scripts/scenes/result/RankList', component18);
import component18 from '../../assets/scripts/scenes/SceneController';
registerDef('./scripts/scenes/SceneController', component18);
import component19 from '../../assets/scripts/MainController';
registerDef('./scripts/MainController', component19);
import component19 from '../../assets/scripts/popup/Popup';
registerDef('./scripts/popup/Popup', component19);
import component20 from '../../assets/scripts/popup/Popup';
registerDef('./scripts/popup/Popup', component20);
import component20 from '../../assets/scripts/api/SampleApi';
registerDef('./scripts/api/SampleApi', component20);
import component21 from '../../assets/scripts/api/SampleApi';
registerDef('./scripts/api/SampleApi', component21);
import component21 from '../../assets/scripts/scenes/SceneGuide';
registerDef('./scripts/scenes/SceneGuide', component21);
import component22 from '../../assets/scripts/dialogs/RuleDialogContent';
registerDef('./scripts/dialogs/RuleDialogContent', component22);
import component22 from '../../assets/scripts/game/CustomTextRenderer';
registerDef('./scripts/game/CustomTextRenderer', component22);
import component23 from '../../assets/scripts/game/CustomTextRenderer';
registerDef('./scripts/game/CustomTextRenderer', component23);
import component23 from '../../assets/scripts/MainController';
registerDef('./scripts/MainController', component23);
import component24 from '../../assets/scripts/scenes/SceneController';
registerDef('./scripts/scenes/SceneController', component24);
import component24 from '../../assets/scripts/dialogs/AlertDialogContent';
registerDef('./scripts/dialogs/AlertDialogContent', component24);
import component25 from '../../assets/scripts/dialogs/AlertDialogContent';
registerDef('./scripts/dialogs/AlertDialogContent', component25);
import component25 from '../../assets/scripts/dialogs/PrizeDialogContent';
registerDef('./scripts/dialogs/PrizeDialogContent', component25);
import component26 from '../../assets/scripts/dialogs/PrizeDialogContent';
registerDef('./scripts/dialogs/PrizeDialogContent', component26);
import component26 from '../../assets/scripts/dialogs/ScoreDialogContent';
registerDef('./scripts/dialogs/ScoreDialogContent', component26);
import component27 from '../../assets/scripts/dialogs/ScoreDialogContent';
registerDef('./scripts/dialogs/ScoreDialogContent', component27);
import component27 from '../../assets/scripts/common/Toast';
registerDef('./scripts/common/Toast', component27);
import component28 from '../../assets/scripts/common/Toast';
registerDef('./scripts/common/Toast', component28);
import component28 from '../../assets/scripts/Icon';
registerDef('./scripts/Icon', component28);
import component29 from '../../assets/scripts/Icon';
registerDef('./scripts/Icon', component29);
import component30 from '../../assets/scripts/scenes/SceneResult';
registerDef('./scripts/scenes/SceneResult', component30);
import component29 from '../../assets/scripts/scenes/result/RankItem';
registerDef('./scripts/scenes/result/RankItem', component29);
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