Commit 6613eb2e authored by wildfirecode's avatar wildfirecode

1

parent a6a1ecf7
No preview for this file type
node_modules
debug
.rpt2_cache
dist
\ No newline at end of file
dist
**/*/.DS_Store
\ No newline at end of file
{"currentScene":"assets/scenes/main.scene"}
\ No newline at end of file
{"ver":"1.0.1","uuid":"6b4347e6-fc1a-47aa-94b1-0a88302437bd","subMetas":{},"isGroup":true}
{
"name": "ball1",
"root": {
"uuid": "20190301114308",
"components": [
{
"script": "components/base/Transform"
}
],
"children": [
{
"uuid": "20190301114245",
"name": "ball1",
"components": [
{
"script": "components/base/Transform",
"properties": {}
}
],
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|7eb83e28-16db-43c5-a6a5-3e7e2abca5b7"
}
}
],
"uuid": "3348f059-ffca-4670-9cbc-d9fdd014a17f"
}
]
}
]
}
}
\ No newline at end of file
{"ver":"1.0.1","uuid":"d6c6eb9d-b2bf-4da7-9017-1fdde2766886","subMetas":{},"type":"prefab"}
......@@ -100,12 +100,12 @@
"script": "./scripts/scenes/SceneStart",
"properties": {
"rulebtn": "entity|6d639acc-797c-465d-b69d-785748640c8e",
"treeWrapper": "entity|e7de54a8-05e2-49e3-855f-15ef3d776804",
"startbtn": "entity|5f3ed06e-c47a-491e-a3a1-9ac0e700a302",
"ajaxElement": "dynamic|API|ajaxElement",
"doJoin": "dynamic|API|doJoin",
"getNgameStartStatus": "dynamic|API|getNgameStartStatus",
"getOrderStatus": "dynamic|API|getOrderStatus"
"getOrderStatus": "dynamic|API|getOrderStatus",
"rankbtn": "entity|5f3ed06e-c47a-491e-a3a1-9ac0e700a302"
},
"disabled": false
},
......@@ -221,428 +221,58 @@
"children": []
},
{
"name": "ScrollView",
"components": [
{
"script": "components/base/Transform",
"properties": {
"width": 300,
"height": 200,
"position": {
"x": 0,
"y": -350,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"fillColor": "rgba(255, 255, 255, 0.7)"
},
"disabled": false
},
{
"script": "components/ui/ScrollView",
"properties": {
"viewport": "entity|c733e83b-ca39-46cc-8924-6ae528e2920a",
"content": "entity|e2930f12-a588-46f1-89f1-90f88b9f3769",
"lockingType": 1
}
}
],
"uuid": "81498e7c-0764-45d1-b57f-c50ca858b8e5",
"children": [
{
"name": "Viewport",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"fillColor": "rgba(214, 66, 228, 1)",
"isMask": true
},
"disabled": false
},
{
"script": "components/other/RelativeLayout",
"properties": {
"left": 0,
"right": 0,
"top": 0,
"bottom": 0,
"once": false
}
}
],
"uuid": "c733e83b-ca39-46cc-8924-6ae528e2920a",
"children": [
{
"name": "Content",
"components": [
{
"script": "components/base/Transform",
"properties": {
"height": 500
}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"fillColor": "rgba(84, 230, 81, 1)",
"height": 500
},
"disabled": false
},
{
"script": "components/other/RelativeLayout",
"properties": {
"left": 0,
"right": 0,
"top": 0
},
"disabled": false
}
],
"uuid": "e2930f12-a588-46f1-89f1-90f88b9f3769",
"children": [
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "fuck",
"fillColor": "rgba(228, 71, 66, 1)",
"textStyle": {
"fontSize": 100
}
}
},
{
"script": "components/other/RelativeLayout",
"properties": {
"top": 0
}
}
],
"uuid": "dfc1a09a-bcc8-48ee-a3de-8e8ab2540859"
},
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "fuck2",
"fillColor": "rgba(228, 71, 66, 1)",
"textStyle": {
"fontSize": 100
}
}
},
{
"script": "components/other/RelativeLayout",
"properties": {
"top": 100
}
}
],
"uuid": "1a533fcf-c040-401d-9bce-5a12a2ffcaca"
},
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "fuck3",
"fillColor": "rgba(228, 71, 66, 1)",
"textStyle": {
"fontSize": 100
}
}
},
{
"script": "components/other/RelativeLayout",
"properties": {
"bottom": 0
}
}
],
"uuid": "d0db2a44-222c-4cd6-9fb8-b99d0932781b"
}
]
}
]
}
],
"disabled": true
},
{
"name": "treewrapper",
"name": "ruleBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"y": 57.5,
"_type_": "scilla/support/Vector2D",
"x": 5
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|e4e0b901-f0ef-4c1c-a90e-bc923dd8c4e7",
"anchor": {
"y": 0.9,
"x": 288.010101010101,
"y": -671.2575757575759,
"_type_": "scilla/support/Vector2D"
}
}
}
],
"uuid": "e7de54a8-05e2-49e3-855f-15ef3d776804",
"children": [
{
"name": "Entity",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -10,
"y": -72.5
}
}
}
],
"uuid": "e4997d8e-0043-4357-863f-39499285d21d",
"children": [
{
"name": "gift",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -42.5,
"y": -282.5
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|2b8c13b0-c675-4031-ac51-8d39afb41505"
}
}
],
"uuid": "740d9bb3-9c3c-44a6-b015-f8db20bd1558"
},
{
"name": "gift",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 105,
"y": -340
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|7e76fac1-7791-476b-b73f-7cd5b4ea1344"
}
}
],
"uuid": "db53dfe6-225d-4344-88a3-aea6b8e50312",
"children": []
},
{
"name": "gift",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -165,
"y": -407.5
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|e6ca4128-75b8-4b8b-8a7d-8f95d46f810f"
}
}
],
"uuid": "515e3e6c-3562-4cab-a5dc-7c74a270fc60"
},
{
"name": "gift",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -5,
"y": -440
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|9c6e40d8-0c90-41fe-ad28-9064ca7103ee"
}
}
],
"uuid": "8a530d8f-b95e-4e52-abbe-acd8193c1c64"
},
{
"name": "gift",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 87.5,
"y": -180
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|9c55b44d-3454-438d-b5fd-d73fea0a291c"
}
}
],
"uuid": "3d15f413-98e8-423e-a611-940df33edbdf"
},
{
"name": "gift",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 252.5,
"y": -445
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|41a91467-d5fa-461d-b2dc-a842c786b76a"
}
}
],
"uuid": "dbd895fe-9eab-4a5b-9659-cdd8d90fb783"
}
]
}
],
"disabled": false
},
{
"name": "brand",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -25,
"y": -627.5
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|ce594e8b-00d9-4171-a4e1-3d77fd6746f6"
}
}
],
"uuid": "f85a6212-dc4c-4b71-8c3d-041993b935e1",
"disabled": false
},
{
"name": "noname",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -2.5,
"y": 102.5
}
"texture": "res|d092293f-6a84-45eb-a7c2-7735b747c2af"
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|13befe8b-8a33-46e2-bee6-fa0d17994329"
}
}
],
"uuid": "78c6207b-a7d2-41b6-8ed0-e87b04642dee",
"disabled": false
},
{
"name": "roles",
"components": [
{
"script": "components/base/Transform",
"script": "components/animation/TouchZoom",
"properties": {
"position": {
"x": 37.5,
"y": -45
}
"easeName": "backOut"
}
},
{
"script": "components/renderer/TextureRenderer",
"script": "components/ui/Button",
"properties": {
"texture": "res|5c3bc8ff-d886-437f-8320-cfef9bdc71e6"
"onClick": [
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "onClick_rulebtn"
}
],
"disabledRes": "res|d092293f-6a84-45eb-a7c2-7735b747c2af",
"upRes": "res|d092293f-6a84-45eb-a7c2-7735b747c2af",
"downRes": "res|d092293f-6a84-45eb-a7c2-7735b747c2af"
}
}
],
"uuid": "d17386f1-a9fc-4125-9b60-37f25801ed21",
"disabled": false
"children": [],
"uuid": "6d639acc-797c-465d-b69d-785748640c8e"
},
{
"name": "ruleBtn",
"name": "recordBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -280,
"y": -762.1666666666667,
"x": 288.010101010101,
"y": -731.8636363636363,
"_type_": "scilla/support/Vector2D"
}
}
......@@ -650,7 +280,7 @@
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|d092293f-6a84-45eb-a7c2-7735b747c2af"
"texture": "res|7c2aa27c-5cf6-46d0-8509-d9b68052de09"
}
},
{
......@@ -666,27 +296,27 @@
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "onClick_rulebtn"
"method": "onClick_recordbtn"
}
],
"disabledRes": "res|d092293f-6a84-45eb-a7c2-7735b747c2af",
"upRes": "res|d092293f-6a84-45eb-a7c2-7735b747c2af",
"downRes": "res|d092293f-6a84-45eb-a7c2-7735b747c2af"
"disabledRes": "res|7c2aa27c-5cf6-46d0-8509-d9b68052de09",
"upRes": "res|7c2aa27c-5cf6-46d0-8509-d9b68052de09",
"downRes": "res|7c2aa27c-5cf6-46d0-8509-d9b68052de09"
}
}
],
"children": [],
"uuid": "6d639acc-797c-465d-b69d-785748640c8e"
"uuid": "47299b0c-16e5-4ef6-8d9b-5b6b6ad1077d"
},
{
"name": "recordBtn",
"name": "rankBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 282,
"y": -762.1666666666667,
"x": 0,
"y": 245.1060606060605,
"_type_": "scilla/support/Vector2D"
}
}
......@@ -694,7 +324,7 @@
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|7c2aa27c-5cf6-46d0-8509-d9b68052de09"
"texture": "res|65d0864b-a3b8-438b-aa87-673311473c7f"
}
},
{
......@@ -710,17 +340,17 @@
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "onClick_recordbtn"
"method": "onClick_startbtn"
}
],
"disabledRes": "res|7c2aa27c-5cf6-46d0-8509-d9b68052de09",
"upRes": "res|7c2aa27c-5cf6-46d0-8509-d9b68052de09",
"downRes": "res|7c2aa27c-5cf6-46d0-8509-d9b68052de09"
"disabledRes": "res|65d0864b-a3b8-438b-aa87-673311473c7f",
"upRes": "res|65d0864b-a3b8-438b-aa87-673311473c7f",
"downRes": "res|65d0864b-a3b8-438b-aa87-673311473c7f"
}
}
],
"children": [],
"uuid": "47299b0c-16e5-4ef6-8d9b-5b6b6ad1077d"
"uuid": "5f3ed06e-c47a-491e-a3a1-9ac0e700a302"
},
{
"name": "startBtn",
......@@ -730,7 +360,7 @@
"properties": {
"position": {
"x": 0,
"y": 197.83333333333326,
"y": 299.651515151515,
"_type_": "scilla/support/Vector2D"
}
}
......@@ -738,7 +368,7 @@
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|65d0864b-a3b8-438b-aa87-673311473c7f"
"texture": "res|66066ff4-4536-4398-84ad-8cf91c2d8333"
}
},
{
......@@ -753,46 +383,157 @@
"onClick": [
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "onClick_startbtn"
"component": null,
"method": null
}
],
"disabledRes": "res|65d0864b-a3b8-438b-aa87-673311473c7f",
"upRes": "res|65d0864b-a3b8-438b-aa87-673311473c7f",
"downRes": "res|65d0864b-a3b8-438b-aa87-673311473c7f"
"disabledRes": "res|66066ff4-4536-4398-84ad-8cf91c2d8333",
"upRes": "res|66066ff4-4536-4398-84ad-8cf91c2d8333",
"downRes": "res|66066ff4-4536-4398-84ad-8cf91c2d8333"
}
}
],
"children": [],
"uuid": "5f3ed06e-c47a-491e-a3a1-9ac0e700a302"
"uuid": "34f68eec-739c-478c-a527-6aa12c197850"
}
],
"disabled": false
},
{
"name": "ScenePlay",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"name": "tips",
"script": "./scripts/scenes/ScenePlay",
"properties": {}
}
],
"uuid": "0690fa72-d77d-42c2-ac55-6b6adccee9bf",
"children": [
{
"name": "Entity",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"position": {
"x": 0,
"y": 287
}
"text": "plays"
}
}
],
"uuid": "b06ee9d5-d456-49c0-bf39-0a9c5e3186bb"
}
],
"disabled": true
},
{
"name": "SceneGuide",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "./scripts/scenes/SceneGuide",
"properties": {}
}
],
"uuid": "bc43f371-06cb-406f-bbbc-964dec0157e4",
"children": [
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "理性饮酒",
"fillColor": "rgba(255, 255, 255, 1)",
"text": "guide",
"fillColor": "rgba(255, 0, 0, 1)",
"textStyle": {
"fontSize": 31
"fontSize": 50
}
}
}
],
"uuid": "1daa1f87-10c0-48a6-9779-5a9ed3f1e2f3"
"uuid": "bbb4aaa8-f5b4-42ee-9ce9-6103855fe905"
}
],
"disabled": true
},
{
"name": "SceneCountdown",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "./scripts/scenes/SceneCountdown",
"properties": {}
}
],
"uuid": "8cee1a07-efe0-4a72-b8d1-bc4012128b6e",
"disabled": true,
"children": [
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "SceneCountdown"
}
}
],
"uuid": "e3424123-bb9a-49b4-94ec-12c27a4e048e"
}
]
},
{
"name": "SceneResult",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "./scripts/scenes/SceneResult",
"properties": {}
}
],
"uuid": "5f2a7508-4728-430b-b306-06f719ea81e3",
"disabled": true,
"children": [
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "result"
}
}
],
"uuid": "0635f050-44bd-48a5-86f0-8df37f11063f"
}
]
}
]
},
......@@ -1482,6 +1223,22 @@
{
"name": "组 81.png",
"uuid": "7e76fac1-7791-476b-b73f-7cd5b4ea1344"
},
{
"name": "ball1.png",
"uuid": "7eb83e28-16db-43c5-a6a5-3e7e2abca5b7"
},
{
"name": "ball2.png",
"uuid": "9d796938-f7de-45b1-8135-101a48277c1a"
},
{
"name": "ball3.png",
"uuid": "7c42d0d1-b40e-4df5-8698-30ccf3c2f8bc"
},
{
"name": "rankbtn.png",
"uuid": "66066ff4-4536-4398-84ad-8cf91c2d8333"
}
]
}
......
......@@ -8,6 +8,9 @@ import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { VirtualNavigator } from "./VirtualNavigator";
import SceneStart from "../scenes/SceneStart";
import ScenePlay from "../scenes/ScenePlay";
import SceneGuide from "../scenes/SceneGuide";
import SceneCountdown from "../scenes/SceneCountdown";
import SceneResult from "../scenes/SceneResult";
export default class SingleSceneNavigator extends ScillaComponent {
_navigator: VirtualNavigator;
......@@ -17,6 +20,9 @@ export default class SingleSceneNavigator extends ScillaComponent {
this._navigator = new VirtualNavigator(this.entity);
this._navigator.register('start', 'SceneStart', SceneStart);
this._navigator.register('play', 'ScenePlay', ScenePlay);
this._navigator.register('guide', 'SceneGuide', SceneGuide);
this._navigator.register('countdown', 'SceneCountdown', SceneCountdown);
this._navigator.register('result', 'SceneResult', SceneResult);
}
onAwake() {
......
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
export default class SceneCountdown extends ScillaComponent implements INavigatorViewBase {
onAwake() {
super.onAwake();
setTimeout(() => {
this.bubbling('fuck', 'play');
}, 1000);
}
// _timer
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
{"ver":"1.0.1","uuid":"bfde8457-9b03-42f8-b7b2-d537e5481227","subMetas":{},"type":"script"}
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
export default class SceneGuide extends ScillaComponent implements INavigatorViewBase {
onAwake() {
super.onAwake();
setTimeout(() => {
this.bubbling('fuck', 'countdown');
}, 1000);
}
// _timer
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
{"ver":"1.0.1","uuid":"9b858404-d4f3-49a0-a174-6947fc5e52ec","subMetas":{},"type":"script"}
......@@ -6,6 +6,51 @@ export default class ScenePlay extends ScillaComponent implements INavigatorView
onAwake() {
super.onAwake();
let addCounter = 0;
const add = () => {
addCounter++;
this.addBall();
}
setInterval(() => {
console.log('上一秒摇晃的能量是', addCounter);
addCounter = 0;
}, 1000);
//运动事件监听
if (window['DeviceMotionEvent']) {
window.addEventListener('devicemotion', deviceMotionHandler, false);
}
var SHAKE_THRESHOLD = 100; //累积200的速度值出一个球
var x, y, z, last_x = 0, last_y = 0, last_z = 0;
var speedCounter = 0;
function deviceMotionHandler(eventData) {
var acceleration = eventData.accelerationIncludingGravity;
x = acceleration.x;
y = acceleration.y;
z = acceleration.z;
var speed = Math.abs(x + y + z - last_x - last_y - last_z) * 1;
//快的时候差不多速度几十
//静止的时候是0
speedCounter += speed;
if (speedCounter >= SHAKE_THRESHOLD) {
speedCounter = 0;
add();
}
last_x = x;
last_y = y;
last_z = z;
}
}
addBall() {
}
onGameOver() {
this.bubbling('fuck', 'result');
}
// _timer
......@@ -13,7 +58,6 @@ export default class ScenePlay extends ScillaComponent implements INavigatorView
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
......
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
export default class SceneResult extends ScillaComponent implements INavigatorViewBase {
onAwake() {
super.onAwake();
}
// _timer
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
{"ver":"1.0.1","uuid":"83555ffb-9b5c-47af-a811-b9315ca88211","subMetas":{},"type":"script"}
......@@ -26,34 +26,17 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
super.onAwake();
}
// private setCountText(text: string) {
// setText(this.countTxt, text);
// }
initGameStage() {
// // this.updateCountText();
// this.bubbling('showToast', '活动还未开始\n敬请期待')
}
// updateCountText() {
// const { element } = this.ajaxElement;
// let text = ''
// if (element.freeLimit > 0) {
// text = `今日剩余免费次数:${element.freeLimit}次`;
// } else {
// text = `${element.needCredits}${window['CFG'].unitName}/次`
// }
// this.setCountText(text);
// }
onClick_startbtn() {
this.startbtn.getComponent(Button).enabled = false;
this._shakeTimes = this.SHAK_TIMERS;
this._counter = 0;
setRotation(this.treeWrapper, this.STREN);
this.sendDojoin();
}
onShakeOver() {
sendDojoin() {
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.dojoinFunc(tokenObj.token);
......@@ -74,36 +57,11 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
});
}
private STREN = 5;
private FREQ = 3;
private SHAK_TIMERS = 10;
private _shakeTimes = -1;
private _counter = -1;
onUpdate() {
if (this._shakeTimes <= 0) return;
if (this._counter <= 0) {
this._shakeTimes--;
setRotation(this.treeWrapper, -getRotation(this.treeWrapper))
if (this._shakeTimes <= 0) {
setRotation(this.treeWrapper, 0);
this.onShakeOver();
}
this._counter = this.FREQ;
} else {
this._counter--;
}
}
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
// this.startbtn.getComponent(Button).enabled = true;
this.broadcast('callApi', 1, 'getOrderStatus', {
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
// this.broadcast('callApi', 1, 'getNgameStartStatus', {
// orderId: this.doJoin
// });
}
onGotDojoinError(error) {
......@@ -123,42 +81,15 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
console.log('onGotDojoinError', error);
}
onResponse_getOrderStatus() {
this.startbtn.getComponent(Button).enabled = true;
console.log('onResponse_getOrderStatus', this.getOrderStatus);
if (this.getOrderStatus.lottery) {
this.bubbling('showDialog', 'Prize', this.getOrderStatus);
} else {
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
}
}
onError_getOrderStatus(error) {
this.startbtn.getComponent(Button).enabled = true;
this.bubbling('showDialog', 'Alert', '网络异常,请稍后再试~');
// if (error === '0') {
// this.bubbling('showDialog', 'Alert', '活动还未开始\n敬请期待~');
// }
// else if (error === '1') {
// this.bubbling('showDialog', 'Alert', '活动已结束\n下次早点来哦~');
// }
// else if (error === '2') {
// this.bubbling('showDialog', 'Alert', '您已经没有抽奖机会了');
// }
// else {
// this.bubbling('showDialog', 'Alert', '网络异常,请稍后再试~');
// }
console.log('onError_getOrderStatus', error);
}
onGot_getNgameStartStatus() {
this.startbtn.getComponent(Button).enabled = true;
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
if (this.getNgameStartStatus.orderId) {
this.bubbling('showDialog', 'Prize', this.getNgameStartStatus);
} else {
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
}
// if (this.getNgameStartStatus.orderId) {
// this.bubbling('showDialog', 'Prize', this.getNgameStartStatus);
// } else {
// this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
// }
this.bubbling('fuck', 'guide');
}
onGotError_getNgameStartStatus(error) {
......
{"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"},"8分.png":{"ver":"1.0.1","uuid":"2b8c13b0-c675-4031-ac51-8d39afb41505","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"},"roles.png":{"ver":"1.0.1","uuid":"5c3bc8ff-d886-437f-8320-cfef9bdc71e6","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"},"text1.png":{"ver":"1.0.1","uuid":"ce594e8b-00d9-4171-a4e1-3d77fd6746f6","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"兑吧大牌券.png":{"ver":"1.0.1","uuid":"41a91467-d5fa-461d-b2dc-a842c786b76a","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"口红.png":{"ver":"1.0.1","uuid":"9c55b44d-3454-438d-b5fd-d73fea0a291c","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"栅栏.png":{"ver":"1.0.1","uuid":"13befe8b-8a33-46e2-bee6-fa0d17994329","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"树.png":{"ver":"1.0.1","uuid":"e4e0b901-f0ef-4c1c-a90e-bc923dd8c4e7","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"炸弹.png":{"ver":"1.0.1","uuid":"9c6e40d8-0c90-41fe-ad28-9064ca7103ee","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"礼盒.png":{"ver":"1.0.1","uuid":"e6ca4128-75b8-4b8b-8a7d-8f95d46f810f","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"组 81.png":{"ver":"1.0.1","uuid":"7e76fac1-7791-476b-b73f-7cd5b4ea1344","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"},"8分.png":{"ver":"1.0.1","uuid":"2b8c13b0-c675-4031-ac51-8d39afb41505","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"},"roles.png":{"ver":"1.0.1","uuid":"5c3bc8ff-d886-437f-8320-cfef9bdc71e6","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"},"text1.png":{"ver":"1.0.1","uuid":"ce594e8b-00d9-4171-a4e1-3d77fd6746f6","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"兑吧大牌券.png":{"ver":"1.0.1","uuid":"41a91467-d5fa-461d-b2dc-a842c786b76a","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"口红.png":{"ver":"1.0.1","uuid":"9c55b44d-3454-438d-b5fd-d73fea0a291c","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"栅栏.png":{"ver":"1.0.1","uuid":"13befe8b-8a33-46e2-bee6-fa0d17994329","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"树.png":{"ver":"1.0.1","uuid":"e4e0b901-f0ef-4c1c-a90e-bc923dd8c4e7","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"炸弹.png":{"ver":"1.0.1","uuid":"9c6e40d8-0c90-41fe-ad28-9064ca7103ee","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"礼盒.png":{"ver":"1.0.1","uuid":"e6ca4128-75b8-4b8b-8a7d-8f95d46f810f","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"组 81.png":{"ver":"1.0.1","uuid":"7e76fac1-7791-476b-b73f-7cd5b4ea1344","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"ball1.png":{"ver":"1.0.1","uuid":"7eb83e28-16db-43c5-a6a5-3e7e2abca5b7","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"ball2.png":{"ver":"1.0.1","uuid":"9d796938-f7de-45b1-8135-101a48277c1a","rawTextureUuid":"ed0e6061-7014-492f-b95f-88794de7d5cc","type":"texture"},"ball3.png":{"ver":"1.0.1","uuid":"7c42d0d1-b40e-4df5-8698-30ccf3c2f8bc","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"}
assets/sheets/start.sht/recordbtn.png

3.42 KB | W: | H:

assets/sheets/start.sht/recordbtn.png

5.29 KB | W: | H:

assets/sheets/start.sht/recordbtn.png
assets/sheets/start.sht/recordbtn.png
assets/sheets/start.sht/recordbtn.png
assets/sheets/start.sht/recordbtn.png
  • 2-up
  • Swipe
  • Onion skin
assets/sheets/start.sht/rulebtn.png

3.19 KB | W: | H:

assets/sheets/start.sht/rulebtn.png

5.06 KB | W: | H:

assets/sheets/start.sht/rulebtn.png
assets/sheets/start.sht/rulebtn.png
assets/sheets/start.sht/rulebtn.png
assets/sheets/start.sht/rulebtn.png
  • 2-up
  • Swipe
  • Onion skin
assets/sheets/start.sht/startbtn.png

21.6 KB | W: | H:

assets/sheets/start.sht/startbtn.png

22.3 KB | W: | H:

assets/sheets/start.sht/startbtn.png
assets/sheets/start.sht/startbtn.png
assets/sheets/start.sht/startbtn.png
assets/sheets/start.sht/startbtn.png
  • 2-up
  • Swipe
  • Onion skin
assets/singles/bg.jpg

51 KB | W: | H:

assets/singles/bg.jpg

111 KB | W: | H:

assets/singles/bg.jpg
assets/singles/bg.jpg
assets/singles/bg.jpg
assets/singles/bg.jpg
  • 2-up
  • Swipe
  • Onion skin
assets/singles/cankao.jpg

161 KB | W: | H:

assets/singles/cankao.jpg

127 KB | W: | H:

assets/singles/cankao.jpg
assets/singles/cankao.jpg
assets/singles/cankao.jpg
assets/singles/cankao.jpg
  • 2-up
  • Swipe
  • Onion skin
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>shuijf</title>
<title>shuijf2</title>
<meta name="viewport"
content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
......
......@@ -5,74 +5,86 @@
import {registerDef} from 'scilla'
import component0 from 'components/other/RelativeLayout';
registerDef('components/other/RelativeLayout', component0);
import component0 from 'components/other/CameraController';
registerDef('components/other/CameraController', component0);
import component1 from 'components/base/Transform';
registerDef('components/base/Transform', component1);
import component2 from 'components/renderer/HtmlRenderer';
registerDef('components/renderer/HtmlRenderer', component2);
import component2 from 'components/renderer/TextureRenderer';
registerDef('components/renderer/TextureRenderer', component2);
import component3 from 'components/base/TouchInterrupt';
registerDef('components/base/TouchInterrupt', component3);
import component3 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component3);
import component4 from 'components/ui/Button';
registerDef('components/ui/Button', component4);
import component5 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component5);
import component5 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextRenderer', component5);
import component6 from 'components/other/FullStageSize';
registerDef('components/other/FullStageSize', component6);
import component7 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextRenderer', component7);
import component7 from 'components/base/TouchInterrupt';
registerDef('components/base/TouchInterrupt', component7);
import component8 from 'components/other/CameraController';
registerDef('components/other/CameraController', component8);
import component8 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component8);
import component9 from 'components/renderer/TextureRenderer';
registerDef('components/renderer/TextureRenderer', component9);
import component9 from 'components/ui/ScrollView';
registerDef('components/ui/ScrollView', component9);
import component10 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component10);
import component10 from 'components/other/RelativeLayout';
registerDef('components/other/RelativeLayout', component10);
import component11 from 'components/ui/ScrollView';
registerDef('components/ui/ScrollView', component11);
import component11 from 'components/renderer/HtmlRenderer';
registerDef('components/renderer/HtmlRenderer', component11);
import component12 from '../../assets/scripts/dialogs/RuleDialogContent';
registerDef('./scripts/dialogs/RuleDialogContent', component12);
import component12 from '../../assets/scripts/scenes/ScenePlay';
registerDef('./scripts/scenes/ScenePlay', component12);
import component13 from '../../assets/scripts/api/SamplePollingApi';
registerDef('./scripts/api/SamplePollingApi', component13);
import component13 from '../../assets/scripts/navigator/SingleSceneNavigator';
registerDef('./scripts/navigator/SingleSceneNavigator', component13);
import component14 from '../../assets/scripts/navigator/SingleSceneNavigator';
registerDef('./scripts/navigator/SingleSceneNavigator', component14);
import component14 from '../../assets/scripts/common/Toast';
registerDef('./scripts/common/Toast', component14);
import component15 from '../../assets/scripts/scenes/SceneController';
registerDef('./scripts/scenes/SceneController', component15);
import component15 from '../../assets/scripts/scenes/SceneCountdown';
registerDef('./scripts/scenes/SceneCountdown', component15);
import component16 from '../../assets/scripts/popup/Popup';
registerDef('./scripts/popup/Popup', component16);
import component16 from '../../assets/scripts/scenes/SceneResult';
registerDef('./scripts/scenes/SceneResult', component16);
import component17 from '../../assets/scripts/api/SampleApi';
registerDef('./scripts/api/SampleApi', component17);
import component17 from '../../assets/scripts/popup/Popup';
registerDef('./scripts/popup/Popup', component17);
import component18 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/scenes/SceneStart', component18);
import component19 from '../../assets/scripts/game/CustomTextRenderer';
registerDef('./scripts/game/CustomTextRenderer', component19);
import component19 from '../../assets/scripts/api/SamplePollingApi';
registerDef('./scripts/api/SamplePollingApi', component19);
import component20 from '../../assets/scripts/MainController';
registerDef('./scripts/MainController', component20);
import component20 from '../../assets/scripts/dialogs/RuleDialogContent';
registerDef('./scripts/dialogs/RuleDialogContent', component20);
import component21 from '../../assets/scripts/dialogs/AlertDialogContent';
registerDef('./scripts/dialogs/AlertDialogContent', component21);
import component21 from '../../assets/scripts/MainController';
registerDef('./scripts/MainController', component21);
import component22 from '../../assets/scripts/dialogs/PrizeDialogContent';
registerDef('./scripts/dialogs/PrizeDialogContent', component22);
import component22 from '../../assets/scripts/api/SampleApi';
registerDef('./scripts/api/SampleApi', component22);
import component23 from '../../assets/scripts/common/Toast';
registerDef('./scripts/common/Toast', component23);
import component23 from '../../assets/scripts/game/CustomTextRenderer';
registerDef('./scripts/game/CustomTextRenderer', component23);
import component24 from '../../assets/scripts/scenes/SceneController';
registerDef('./scripts/scenes/SceneController', component24);
import component25 from '../../assets/scripts/dialogs/AlertDialogContent';
registerDef('./scripts/dialogs/AlertDialogContent', component25);
import component26 from '../../assets/scripts/dialogs/PrizeDialogContent';
registerDef('./scripts/dialogs/PrizeDialogContent', component26);
import component27 from '../../assets/scripts/scenes/SceneGuide';
registerDef('./scripts/scenes/SceneGuide', component27);
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