Commit cd7551c9 authored by wildfirecode's avatar wildfirecode

1

parent 5af2c88e
......@@ -272,7 +272,14 @@
"properties": {
"upRes": "res|ac6fde8f-26e8-4172-8bf1-352351779b90",
"downRes": "res|ac6fde8f-26e8-4172-8bf1-352351779b90",
"disabledRes": "res|ac6fde8f-26e8-4172-8bf1-352351779b90"
"disabledRes": "res|ac6fde8f-26e8-4172-8bf1-352351779b90",
"onClick": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onClick_rulebtn"
}
]
}
}
],
......@@ -361,9 +368,154 @@
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"fillColor": "rgba(0, 0, 0, 0.7)"
},
"disabled": true
},
{
"script": "./scripts/popup/Popup",
"properties": {}
},
{
"script": "components/base/TouchInterrupt",
"properties": {}
},
{
"script": "components/other/FullStageSize",
"properties": {}
}
],
"uuid": "3f66eb80-5d67-4b76-a0c1-f385e0a6e947"
"uuid": "3f66eb80-5d67-4b76-a0c1-f385e0a6e947",
"children": [
{
"name": "Alert",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "./scripts/dialogs/AlertDialogContent",
"properties": {}
}
],
"uuid": "53bcf905-9be0-42c8-bfbd-e820076afbd2",
"disabled": true,
"children": [
{
"name": "bg",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|d6163686-6056-40e1-8d5a-5e4248636a27"
}
}
],
"uuid": "8d0919e9-1681-46f8-ae76-bbc9ac7c2515"
},
{
"name": "CloseBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 273.3333333333333,
"y": -293.33333333333337
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|fbb05192-e4f2-4706-a177-91b2c71f24f9"
}
},
{
"script": "components/animation/TouchZoom",
"properties": {
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"disabledRes": "res|fbb05192-e4f2-4706-a177-91b2c71f24f9",
"downRes": "res|fbb05192-e4f2-4706-a177-91b2c71f24f9",
"upRes": "res|fbb05192-e4f2-4706-a177-91b2c71f24f9"
}
}
],
"children": [],
"uuid": "a0fc547e-5d66-4d45-b2b1-1d0c1eee8424"
},
{
"name": "CloseButton2",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|c4d9cb82-8eed-4444-9638-bec8180db868"
}
},
{
"script": "components/animation/TouchZoom",
"properties": {
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"disabledRes": "res|c4d9cb82-8eed-4444-9638-bec8180db868",
"downRes": "res|c4d9cb82-8eed-4444-9638-bec8180db868",
"upRes": "res|c4d9cb82-8eed-4444-9638-bec8180db868",
"onClick": [
{
"entity": "entity|53bcf905-9be0-42c8-bfbd-e820076afbd2",
"component": 1,
"method": "onClickConfirmButton"
}
]
}
}
],
"children": [
{
"name": "label",
"components": [
{
"script": "components/base/Transform"
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "button",
"fillColor": "rgba(255, 255, 255, 1)"
}
}
],
"uuid": "924fc1b9-8358-49eb-a883-513e9dfd6715"
}
],
"uuid": "a819fafe-29e0-4a50-a442-ba1af70c96c8"
}
]
}
]
},
{
"name": "Toast",
......@@ -442,6 +594,18 @@
{
"uuid": "65ad1c9d-457e-437c-a678-1f52ebb98381",
"url": "singles/bg.jpg"
},
{
"uuid": "c4d9cb82-8eed-4444-9638-bec8180db868",
"url": "singles/button-red.png"
},
{
"uuid": "fbb05192-e4f2-4706-a177-91b2c71f24f9",
"url": "singles/close.png"
},
{
"uuid": "d6163686-6056-40e1-8d5a-5e4248636a27",
"url": "singles/dialog-bg.png"
}
]
}
......
......@@ -28,7 +28,6 @@ export default class MainController extends ScillaComponent {
onGotAjaxElement() {
this.broadcast('initGameStage');
this.showToast('onGotAjaxElement');
}
onGotAjaxElementError(e) {
......
{"ver":"1.0.1","uuid":"997b374c-347d-466a-af4f-50f115d294cd","subMetas":{},"isGroup":true}
/**
* Created by rockyl on 2019-04-10.
*
* 警告对话框内容
*/
import DialogContent from "../popup/DialogContent";
export default class AlertDialogContent extends DialogContent {
onAwake() {
super.onAwake();
}
setup(data: any = {}) {
}
onClickConfirmButton() {
this.hide('confirm')
}
}
{"ver":"1.0.1","uuid":"9041556e-1ad1-48a6-8060-9a0315d5606d","subMetas":{},"type":"script"}
{"ver":"1.0.1","uuid":"be102305-c06e-4717-9148-a59fccddef73","subMetas":{},"type":"script"}
/**
* Created by rockyl on 2019-05-22.
*
* 自定义按钮
*/
import Button from "components/ui/Button";
export default class CustomButton extends Button {
upLabelColorKey:string;
disabledLabelColorKey:string;
onAwake() {
super.onAwake();
const config = window['configJson'];
if(this.upLabelColorKey){
this.upLabelColor = config[this.upLabelColorKey];
}
if(this.disabledLabelColorKey){
this.disabledLabelColor = config[this.disabledLabelColorKey];
}
}
}
......@@ -8,7 +8,7 @@ import ScillaComponent from "components/base/ScillaComponent";
import {fade, flew, none, zoom} from "./PopupEffect";
import {raw} from "scilla";
import {decorators} from "scilla";
import CustomButton from "../game/CustomButton";
import { Button } from "scilla-components/src";
const {dirtyFieldTrigger} = decorators;
......@@ -18,7 +18,7 @@ export default class DialogContent extends ScillaComponent {
showEffectOptions: raw;
hideEffectOptions: raw;
protected _closeButton: CustomButton;
protected _closeButton: Button;
effectImpl = none;
......@@ -36,7 +36,7 @@ export default class DialogContent extends ScillaComponent {
if (!this._closeButton) {
const buttons = this.entity.getChildrenByName('CloseButton');
if (buttons.length > 0) {
this._closeButton = buttons[0].getComponent(CustomButton);
this._closeButton = buttons[0].getComponent(Button);
this._closeButton.onClick.addListener(this.onTapCloseButton, this);
}
}
......
......@@ -7,7 +7,6 @@ import { dynamic, Entity } from "scilla";
import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import SingleSceneNavigator from "../navigator/SingleSceneNavigator";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
......@@ -22,7 +21,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
onAwake() {
super.onAwake();
this.setCountText('');
SingleSceneNavigator
// SingleSceneNavigator
}
private setCountText(text: string) {
......@@ -74,9 +73,14 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
console.log('onGotError_getNgameStartStatus');
}
onAlertClose() {
console.log('onAlertClose');
};
// onAlertClose() {
// console.log('onAlertClose');
// };
onClick_rulebtn() {
console.log('onClick_rulebtn')
this.bubbling('showDialog', 'Alert')
}
onClick_rankbtn() {
alert('onClick_rankbtn')
......
{"ver":"1.0.1","uuid":"c4d9cb82-8eed-4444-9638-bec8180db868","subMetas":{"button-red":{"ver":"1.0.1","uuid":"856e2ee2-68ef-4c4d-bc52-369867b98982","rawTextureUuid":"c4d9cb82-8eed-4444-9638-bec8180db868","type":"texture"}},"type":"texture","imagePath":"/Users/wanghongyuan/new-kickball/assets/singles/button-red.png"}
{"ver":"1.0.1","uuid":"fbb05192-e4f2-4706-a177-91b2c71f24f9","subMetas":{"close":{"ver":"1.0.1","uuid":"834f5b58-e063-4e9d-a211-343354ad84d7","rawTextureUuid":"fbb05192-e4f2-4706-a177-91b2c71f24f9","type":"texture"}},"type":"texture","imagePath":"/Users/wanghongyuan/new-kickball/assets/singles/close.png"}
{"ver":"1.0.1","uuid":"d6163686-6056-40e1-8d5a-5e4248636a27","subMetas":{"dialog-bg":{"ver":"1.0.1","uuid":"44e18ac2-22fc-416f-b831-7d5b405e6260","rawTextureUuid":"d6163686-6056-40e1-8d5a-5e4248636a27","type":"texture"}},"type":"texture","imagePath":"/Users/wanghongyuan/new-kickball/assets/singles/dialog-bg.png"}
......@@ -27,6 +27,7 @@
- webservice,SampleApi,SamplePollingApi
- toast
- net和data
- scene&popup
# 日报
- 5.28 跑新的demo,运行成功
......
......@@ -5,50 +5,59 @@
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/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component2);
import component2 from 'components/base/TouchInterrupt';
registerDef('components/base/TouchInterrupt', component2);
import component3 from 'components/ui/Button';
registerDef('components/ui/Button', component3);
import component3 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component3);
import component4 from 'components/other/FullStageSize';
registerDef('components/other/FullStageSize', component4);
import component5 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component5);
import component5 from 'components/ui/Button';
registerDef('components/ui/Button', component5);
import component6 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextRenderer', component6);
import component6 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component6);
import component7 from 'components/other/CameraController';
registerDef('components/other/CameraController', component7);
import component8 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/scenes/SceneStart', component8);
import component8 from 'components/renderer/TextureRenderer';
registerDef('components/renderer/TextureRenderer', component8);
import component9 from '../../assets/scripts/scenes/SceneController';
registerDef('./scripts/scenes/SceneController', component9);
import component9 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/scenes/SceneStart', component9);
import component10 from '../../assets/scripts/navigator/SingleSceneNavigator';
registerDef('./scripts/navigator/SingleSceneNavigator', component10);
import component10 from '../../assets/scripts/scenes/SceneController';
registerDef('./scripts/scenes/SceneController', component10);
import component11 from '../../assets/scripts/api/SampleApi';
registerDef('./scripts/api/SampleApi', component11);
import component11 from '../../assets/scripts/navigator/SingleSceneNavigator';
registerDef('./scripts/navigator/SingleSceneNavigator', component11);
import component12 from '../../assets/scripts/api/SamplePollingApi';
registerDef('./scripts/api/SamplePollingApi', component12);
import component13 from '../../assets/scripts/MainController';
registerDef('./scripts/MainController', component13);
import component13 from '../../assets/scripts/api/SampleApi';
registerDef('./scripts/api/SampleApi', component13);
import component14 from '../../assets/scripts/common/Toast';
registerDef('./scripts/common/Toast', component14);
import component14 from '../../assets/scripts/popup/Popup';
registerDef('./scripts/popup/Popup', component14);
import component15 from '../../assets/scripts/game/CustomTextRenderer';
registerDef('./scripts/game/CustomTextRenderer', component15);
import component15 from '../../assets/scripts/MainController';
registerDef('./scripts/MainController', component15);
import component16 from '../../assets/scripts/dialogs/AlertDialogContent';
registerDef('./scripts/dialogs/AlertDialogContent', component16);
import component17 from '../../assets/scripts/common/Toast';
registerDef('./scripts/common/Toast', component17);
import component18 from '../../assets/scripts/game/CustomTextRenderer';
registerDef('./scripts/game/CustomTextRenderer', component18);
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