Commit beefb4f4 authored by wildfirecode's avatar wildfirecode

1

parent 11ca674c
...@@ -22,9 +22,32 @@ ...@@ -22,9 +22,32 @@
{ {
"script": "./scripts/MainController", "script": "./scripts/MainController",
"properties": { "properties": {
"Popup": "entity|dbfac9aa-8955-4725-89cf-eae9f8cf7595" "Popup": "entity|dbfac9aa-8955-4725-89cf-eae9f8cf7595",
"Toast": "entity|1d7c03a2-f89a-47ca-9681-7dd17352a14f"
}, },
"disabled": false "disabled": false
},
{
"script": "./scripts/api/SampleApi",
"properties": {
"method": "GET",
"name": "ajaxElement",
"onError": [
{
"entity": "entity|20181212032053",
"component": 2,
"method": "onGotAjaxElementError"
}
],
"onResponse": [
{
"entity": "entity|20181212032053",
"component": 2,
"method": "onGotAjaxElement"
}
],
"uri": "/hdtool/recon/ajaxElement"
}
} }
], ],
"children": [ "children": [
...@@ -34,6 +57,14 @@ ...@@ -34,6 +57,14 @@
{ {
"script": "components/base/Transform", "script": "components/base/Transform",
"properties": {} "properties": {}
},
{
"script": "./scripts/scenes/SceneController",
"properties": {}
},
{
"script": "./scripts/navigator/SingleSceneNavigator",
"properties": {}
} }
], ],
"uuid": "23b027e4-3a90-4e46-a74e-dc5de005238c", "uuid": "23b027e4-3a90-4e46-a74e-dc5de005238c",
...@@ -44,12 +75,16 @@ ...@@ -44,12 +75,16 @@
{ {
"script": "components/base/Transform", "script": "components/base/Transform",
"properties": {} "properties": {}
},
{
"script": "./scripts/scenes/SceneStart",
"properties": {}
} }
], ],
"uuid": "41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c", "uuid": "41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"children": [ "children": [
{ {
"name": "Button", "name": "ruleBtn",
"components": [ "components": [
{ {
"script": "components/base/Transform", "script": "components/base/Transform",
...@@ -80,9 +115,9 @@ ...@@ -80,9 +115,9 @@
"properties": { "properties": {
"onClick": [ "onClick": [
{ {
"entity": "entity|20181212032053", "entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1, "component": 1,
"method": "tapMe" "method": "onClick_rulebtn"
} }
] ]
} }
...@@ -93,7 +128,8 @@ ...@@ -93,7 +128,8 @@
"name": "label", "name": "label",
"components": [ "components": [
{ {
"script": "components/base/Transform" "script": "components/base/Transform",
"properties": {}
}, },
{ {
"script": "components/renderer/TextRenderer", "script": "components/renderer/TextRenderer",
...@@ -108,23 +144,6 @@ ...@@ -108,23 +144,6 @@
], ],
"uuid": "cd518011-9d11-4376-af30-f64cef2a08cd" "uuid": "cd518011-9d11-4376-af30-f64cef2a08cd"
}, },
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(255, 255, 255, 1)",
"text": "Tap Button"
}
}
],
"uuid": "797fad3f-17ed-4a9e-841f-a6b91aed37fa"
},
{ {
"name": "Image", "name": "Image",
"components": [ "components": [
...@@ -166,6 +185,23 @@ ...@@ -166,6 +185,23 @@
{ {
"script": "components/base/Transform", "script": "components/base/Transform",
"properties": {} "properties": {}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"fillColor": "rgba(0, 0, 0, 0.7)"
},
"disabled": true
},
{
"script": "./scripts/popup/Popup",
"properties": {
"sceneContainer": "entity|23b027e4-3a90-4e46-a74e-dc5de005238c"
}
},
{
"script": "components/base/TouchInterrupt",
"properties": {}
} }
], ],
"uuid": "dbfac9aa-8955-4725-89cf-eae9f8cf7595", "uuid": "dbfac9aa-8955-4725-89cf-eae9f8cf7595",
...@@ -361,6 +397,54 @@ ...@@ -361,6 +397,54 @@
"disabled": true "disabled": true
} }
] ]
},
{
"name": "Toast",
"components": [
{
"script": "components/base/Transform",
"properties": {
"height": 40
}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"fillColor": "rgba(0, 0, 0, 0.7)",
"cornerRadius": 10
}
},
{
"script": "./scripts/common/Toast",
"properties": {
"Label": "entity|44aec2c1-1670-4347-a0a3-9c3aa4ac0e2a"
}
}
],
"uuid": "1d7c03a2-f89a-47ca-9681-7dd17352a14f",
"children": [
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "./scripts/game/CustomTextRenderer",
"properties": {
"fillColor": "rgba(255, 255, 255, 1)",
"text": "...",
"textStyle": {
"fontSize": 30
}
}
}
],
"uuid": "44aec2c1-1670-4347-a0a3-9c3aa4ac0e2a"
}
],
"disabled": true
} }
] ]
} }
......
{"ver":"1.0.1","uuid":"c59f7148-9a03-47ab-a146-693028d37bee","subMetas":{},"isGroup":true}
/**
* Created by rockyl on 2019-05-23.
*
* 自定义文本渲染器
*/
import TextRenderer from "scilla-components/src/renderer/TextRenderer";
export default class CustomTextRenderer extends TextRenderer {
}
{"ver":"1.0.1","uuid":"f852cfa3-ccbf-4989-a807-65368a72b129","subMetas":{},"type":"script"}
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
*/ */
import ScillaComponent from "scilla-components/src/base/ScillaComponent"; import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { ScenePlay, SceneStart } from "../scenes";
import { VirtualNavigator } from "./VirtualNavigator"; import { VirtualNavigator } from "./VirtualNavigator";
import SceneStart from "../scenes/SceneStart";
import ScenePlay from "../scenes/ScenePlay";
export default class SingleSceneNavigator extends ScillaComponent { export default class SingleSceneNavigator extends ScillaComponent {
_navigator: VirtualNavigator; _navigator: VirtualNavigator;
......
...@@ -117,6 +117,6 @@ export class VirtualNavigator extends EventEmitter implements INavigatorDelegate ...@@ -117,6 +117,6 @@ export class VirtualNavigator extends EventEmitter implements INavigatorDelegate
* @param error * @param error
*/ */
onError(error: Error) { onError(error: Error) {
console.log(error)
} }
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import DialogContent from "./DialogContent"; import DialogContent from "./DialogContent";
import RectRenderer from "scilla-components/src/renderer/RectRenderer"; import RectRenderer from "scilla-components/src/renderer/RectRenderer";
import TouchInterrupt from "scilla-components/src/base/TouchInterrupt"; import TouchInterrupt from "components/base/TouchInterrupt";
import Transform from "scilla-components/src/base/Transform"; import Transform from "scilla-components/src/base/Transform";
import ScillaComponent from "scilla-components/src/base/ScillaComponent"; import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { none } from "./PopupEffect"; import { none } from "./PopupEffect";
......
import ScillaComponent from 'scilla-components/src/base/ScillaComponent';
import SingleSceneNavigator from '../navigator/SingleSceneNavigator';
export default class SceneController extends ScillaComponent {
onAwake() {
super.onAwake();
this.entity.children.forEach(c => c.enabled = false);
}
fuck(p) {
// console.log('fuck',p)
const nav = this.entity.getComponent(SingleSceneNavigator);
nav.push(p)
}
onUpdate(t) {
super.onUpdate(t);
}
// fuckNavigator(p) {
// console.log('fuckNavigator from SceneController', p)
// }
}
{"ver":"1.0.1","uuid":"fd411e04-be60-45d3-aabb-40a76cf4ad25","subMetas":{},"type":"script"}
...@@ -20,7 +20,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -20,7 +20,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
onAwake() { onAwake() {
super.onAwake(); super.onAwake();
this.setCountText(''); // this.setCountText('');
// SingleSceneNavigator // SingleSceneNavigator
console.log('fuck start scene') console.log('fuck start scene')
} }
...@@ -30,7 +30,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -30,7 +30,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
} }
initGameStage() { initGameStage() {
this.updateCountText(); // this.updateCountText();
} }
updateCountText() { updateCountText() {
......
...@@ -5,44 +5,65 @@ ...@@ -5,44 +5,65 @@
import {registerDef} from 'scilla' import {registerDef} from 'scilla'
import component0 from 'components/renderer/TextureRenderer'; import component0 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextureRenderer', component0); registerDef('components/renderer/TextRenderer', component0);
import component1 from 'components/base/Transform'; import component1 from 'components/base/Transform';
registerDef('components/base/Transform', component1); registerDef('components/base/Transform', component1);
import component2 from 'components/other/RelativeLayout'; import component2 from 'components/renderer/HtmlRenderer';
registerDef('components/other/RelativeLayout', component2); registerDef('components/renderer/HtmlRenderer', component2);
import component3 from 'components/renderer/RectRenderer'; import component3 from 'components/other/RelativeLayout';
registerDef('components/renderer/RectRenderer', component3); registerDef('components/other/RelativeLayout', component3);
import component4 from 'components/animation/TouchZoom'; import component4 from 'components/ui/ScrollView';
registerDef('components/animation/TouchZoom', component4); registerDef('components/ui/ScrollView', component4);
import component5 from 'components/ui/Button'; import component5 from 'components/base/TouchInterrupt';
registerDef('components/ui/Button', component5); registerDef('components/base/TouchInterrupt', component5);
import component6 from 'components/renderer/TextRenderer'; import component6 from 'components/animation/Wave';
registerDef('components/renderer/TextRenderer', component6); registerDef('components/animation/Wave', component6);
import component7 from 'components/other/CameraController'; import component7 from 'components/renderer/RectRenderer';
registerDef('components/other/CameraController', component7); registerDef('components/renderer/RectRenderer', component7);
import component8 from 'components/animation/Wave'; import component8 from 'components/animation/TouchZoom';
registerDef('components/animation/Wave', component8); registerDef('components/animation/TouchZoom', component8);
import component9 from 'components/ui/ScrollView'; import component9 from 'components/ui/Button';
registerDef('components/ui/ScrollView', component9); registerDef('components/ui/Button', component9);
import component10 from 'components/renderer/HtmlRenderer'; import component10 from 'components/other/CameraController';
registerDef('components/renderer/HtmlRenderer', component10); registerDef('components/other/CameraController', component10);
import component11 from '../../assets/scripts/dialogs/RuleDialogContent'; import component11 from 'components/renderer/TextureRenderer';
registerDef('./scripts/dialogs/RuleDialogContent', component11); registerDef('components/renderer/TextureRenderer', component11);
import component12 from '../../assets/scripts/MainController'; import component12 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/MainController', component12); registerDef('./scripts/scenes/SceneStart', component12);
import component13 from '../../assets/scripts/game/CustomTextRenderer'; import component13 from '../../assets/scripts/popup/Popup';
registerDef('./scripts/game/CustomTextRenderer', component13); registerDef('./scripts/popup/Popup', component13);
import component14 from '../../assets/scripts/navigator/SingleSceneNavigator';
registerDef('./scripts/navigator/SingleSceneNavigator', component14);
import component15 from '../../assets/scripts/dialogs/RuleDialogContent';
registerDef('./scripts/dialogs/RuleDialogContent', component15);
import component16 from '../../assets/scripts/scenes/SceneController';
registerDef('./scripts/scenes/SceneController', component16);
import component17 from '../../assets/scripts/api/SampleApi';
registerDef('./scripts/api/SampleApi', component17);
import component18 from '../../assets/scripts/game/CustomTextRenderer';
registerDef('./scripts/game/CustomTextRenderer', component18);
import component19 from '../../assets/scripts/MainController';
registerDef('./scripts/MainController', component19);
import component20 from '../../assets/scripts/common/Toast';
registerDef('./scripts/common/Toast', component20);
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