Commit beefb4f4 authored by wildfirecode's avatar wildfirecode

1

parent 11ca674c
......@@ -22,9 +22,32 @@
{
"script": "./scripts/MainController",
"properties": {
"Popup": "entity|dbfac9aa-8955-4725-89cf-eae9f8cf7595"
"Popup": "entity|dbfac9aa-8955-4725-89cf-eae9f8cf7595",
"Toast": "entity|1d7c03a2-f89a-47ca-9681-7dd17352a14f"
},
"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": [
......@@ -34,6 +57,14 @@
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "./scripts/scenes/SceneController",
"properties": {}
},
{
"script": "./scripts/navigator/SingleSceneNavigator",
"properties": {}
}
],
"uuid": "23b027e4-3a90-4e46-a74e-dc5de005238c",
......@@ -44,12 +75,16 @@
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "./scripts/scenes/SceneStart",
"properties": {}
}
],
"uuid": "41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"children": [
{
"name": "Button",
"name": "ruleBtn",
"components": [
{
"script": "components/base/Transform",
......@@ -80,9 +115,9 @@
"properties": {
"onClick": [
{
"entity": "entity|20181212032053",
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "tapMe"
"method": "onClick_rulebtn"
}
]
}
......@@ -93,7 +128,8 @@
"name": "label",
"components": [
{
"script": "components/base/Transform"
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
......@@ -108,23 +144,6 @@
],
"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",
"components": [
......@@ -166,6 +185,23 @@
{
"script": "components/base/Transform",
"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",
......@@ -361,6 +397,54 @@
"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 @@
*/
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { ScenePlay, SceneStart } from "../scenes";
import { VirtualNavigator } from "./VirtualNavigator";
import SceneStart from "../scenes/SceneStart";
import ScenePlay from "../scenes/ScenePlay";
export default class SingleSceneNavigator extends ScillaComponent {
_navigator: VirtualNavigator;
......
......@@ -117,6 +117,6 @@ export class VirtualNavigator extends EventEmitter implements INavigatorDelegate
* @param error
*/
onError(error: Error) {
console.log(error)
}
}
......@@ -5,7 +5,7 @@
import DialogContent from "./DialogContent";
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 ScillaComponent from "scilla-components/src/base/ScillaComponent";
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
onAwake() {
super.onAwake();
this.setCountText('');
// this.setCountText('');
// SingleSceneNavigator
console.log('fuck start scene')
}
......@@ -30,7 +30,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
initGameStage() {
this.updateCountText();
// this.updateCountText();
}
updateCountText() {
......
......@@ -5,44 +5,65 @@
import {registerDef} from 'scilla'
import component0 from 'components/renderer/TextureRenderer';
registerDef('components/renderer/TextureRenderer', component0);
import component0 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextRenderer', component0);
import component1 from 'components/base/Transform';
registerDef('components/base/Transform', component1);
import component2 from 'components/other/RelativeLayout';
registerDef('components/other/RelativeLayout', component2);
import component2 from 'components/renderer/HtmlRenderer';
registerDef('components/renderer/HtmlRenderer', component2);
import component3 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component3);
import component3 from 'components/other/RelativeLayout';
registerDef('components/other/RelativeLayout', component3);
import component4 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component4);
import component4 from 'components/ui/ScrollView';
registerDef('components/ui/ScrollView', component4);
import component5 from 'components/ui/Button';
registerDef('components/ui/Button', component5);
import component5 from 'components/base/TouchInterrupt';
registerDef('components/base/TouchInterrupt', component5);
import component6 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextRenderer', component6);
import component6 from 'components/animation/Wave';
registerDef('components/animation/Wave', component6);
import component7 from 'components/other/CameraController';
registerDef('components/other/CameraController', component7);
import component7 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component7);
import component8 from 'components/animation/Wave';
registerDef('components/animation/Wave', component8);
import component8 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component8);
import component9 from 'components/ui/ScrollView';
registerDef('components/ui/ScrollView', component9);
import component9 from 'components/ui/Button';
registerDef('components/ui/Button', component9);
import component10 from 'components/renderer/HtmlRenderer';
registerDef('components/renderer/HtmlRenderer', component10);
import component10 from 'components/other/CameraController';
registerDef('components/other/CameraController', component10);
import component11 from '../../assets/scripts/dialogs/RuleDialogContent';
registerDef('./scripts/dialogs/RuleDialogContent', component11);
import component11 from 'components/renderer/TextureRenderer';
registerDef('components/renderer/TextureRenderer', component11);
import component12 from '../../assets/scripts/MainController';
registerDef('./scripts/MainController', component12);
import component12 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/scenes/SceneStart', component12);
import component13 from '../../assets/scripts/game/CustomTextRenderer';
registerDef('./scripts/game/CustomTextRenderer', component13);
import component13 from '../../assets/scripts/popup/Popup';
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