Commit 706088d6 authored by wildfirecode's avatar wildfirecode

1

parent fdb6634f
{"currentScene":"assets/scenes/main.scene"}
\ No newline at end of file
This diff is collapsed.
...@@ -11,7 +11,8 @@ import Transform from "scilla-components/src/base/Transform"; ...@@ -11,7 +11,8 @@ import Transform from "scilla-components/src/base/Transform";
export default class Toast extends ScillaComponent { export default class Toast extends ScillaComponent {
Label: Entity; Label: Entity;
padding = 20; ypadding = 20;
xpadding = 50;
offsetY = 0; offsetY = 0;
showDuration = 300; showDuration = 300;
hideDuration = 300; hideDuration = 300;
...@@ -50,13 +51,13 @@ export default class Toast extends ScillaComponent { ...@@ -50,13 +51,13 @@ export default class Toast extends ScillaComponent {
show({content, duration = 1000}) { show({content, duration = 1000}) {
this.entity.enabled = true; this.entity.enabled = true;
const {_bgTransform, _labelRenderer, _labelTransform, padding} = this; const {_bgTransform, _labelRenderer, _labelTransform, xpadding,ypadding} = this;
_labelRenderer.text = content; _labelRenderer.text = content;
_labelRenderer.measureBounds(); _labelRenderer.measureBounds();
_bgTransform.width = _labelTransform.width + padding * 2; _bgTransform.width = _labelTransform.width + xpadding * 2;
_bgTransform.height = _labelTransform.height + padding * 2; _bgTransform.height = _labelTransform.height + ypadding * 2;
this._tweenOut.queue[0].props.position.y = this.outPos; this._tweenOut.queue[0].props.position.y = this.outPos;
......
...@@ -3,19 +3,19 @@ ...@@ -3,19 +3,19 @@
* 弹层 * 弹层
*/ */
import DialogContent from "./DialogContent"; import TouchInterrupt from "components/base/TouchInterrupt";
import RectRenderer from "scilla-components/src/renderer/RectRenderer";
import TouchInterrupt from "components/base/TouchInterrupt";
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 Transform from "scilla-components/src/base/Transform";
import { createTween, Entity } from "scilla/src"; import RectRenderer from "scilla-components/src/renderer/RectRenderer";
import { Entity } from "scilla/src";
import SingleSceneNavigator from "../navigator/SingleSceneNavigator"; import SingleSceneNavigator from "../navigator/SingleSceneNavigator";
import DialogContent from "./DialogContent";
import { none } from "./PopupEffect";
export default class Popup extends ScillaComponent { export default class Popup extends ScillaComponent {
blackLayerDuration = 300; blackLayerDuration = 300;
private _bgRenderer: RectRenderer; bgRenderer: Entity;
private _touchInterrupt: TouchInterrupt; private _touchInterrupt: TouchInterrupt;
private _dialogStack = []; private _dialogStack = [];
...@@ -28,10 +28,11 @@ export default class Popup extends ScillaComponent { ...@@ -28,10 +28,11 @@ export default class Popup extends ScillaComponent {
this._touchInterrupt = this.getComponent(TouchInterrupt); this._touchInterrupt = this.getComponent(TouchInterrupt);
this._touchInterrupt.enabled = false; this._touchInterrupt.enabled = false;
const bgRenderer = this._bgRenderer = this.getComponent(RectRenderer); this.bgRenderer.enabled = false;
bgRenderer.enabled = false;
this._navigator = this.sceneContainer.getComponent(SingleSceneNavigator) this._navigator = this.sceneContainer.getComponent(SingleSceneNavigator);
this.entity.children.forEach(child => child.enabled = false);
} }
fuckNavigator(p) { fuckNavigator(p) {
...@@ -52,17 +53,18 @@ export default class Popup extends ScillaComponent { ...@@ -52,17 +53,18 @@ export default class Popup extends ScillaComponent {
} }
setBgVisible(visible) { setBgVisible(visible) {
if (visible) { this.bgRenderer.enabled = visible;
this._bgRenderer.enabled = true; // if (visible) {
} // this._bgRenderer.enabled = true;
this._bgRenderer.alpha = visible ? 0 : 1; // }
createTween(this, this._bgRenderer, true) // this._bgRenderer.alpha = visible ? 0 : 1;
.to({ alpha: visible ? 1 : 0 }, this.blackLayerDuration) // createTween(this, this._bgRenderer, true)
.call(() => { // .to({ alpha: visible ? 1 : 0 }, this.blackLayerDuration)
if (!visible) { // .call(() => {
this._bgRenderer.enabled = false; // if (!visible) {
} // this._bgRenderer.enabled = false;
}); // }
// });
} }
getDialogInStack(name) { getDialogInStack(name) {
...@@ -118,7 +120,7 @@ export default class Popup extends ScillaComponent { ...@@ -118,7 +120,7 @@ export default class Popup extends ScillaComponent {
const effect = content ? content.effectImpl : none; const effect = content ? content.effectImpl : none;
const effectOptions = content ? content.showEffectOptions : null; const effectOptions = content ? content.showEffectOptions : null;
await effect.show(transform, effectOptions); // await effect.show(transform, effectOptions);
} }
async hideDialog(name, action?: string, data?) { async hideDialog(name, action?: string, data?) {
...@@ -143,7 +145,7 @@ export default class Popup extends ScillaComponent { ...@@ -143,7 +145,7 @@ export default class Popup extends ScillaComponent {
const effect = content ? content.effectImpl : none; const effect = content ? content.effectImpl : none;
const effectOptions = content ? content.hideEffectOptions : null; const effectOptions = content ? content.hideEffectOptions : null;
await effect.hide(transform, effectOptions); // await effect.hide(transform, effectOptions);
dialog.enabled = false; dialog.enabled = false;
if (dialogConfig.callback) { if (dialogConfig.callback) {
......
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
*/ */
import ScillaComponent from "scilla-components/src/base/ScillaComponent"; import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity } from "scilla/src"; import { dynamic, Entity, ScillaEngine } from "scilla/src";
import { setText } from "../entityUtils"; import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator"; import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator"; import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import ScillaLauncher from "scilla-launcher/src";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase { export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic; ajaxElement: dynamic;
...@@ -31,6 +32,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -31,6 +32,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
initGameStage() { initGameStage() {
// this.updateCountText(); // this.updateCountText();
this.bubbling('showToast', '活动还未开始\n敬请期待')
} }
updateCountText() { updateCountText() {
......
{"ver":"1.0.1","uuid":"7812ab8d-1490-4d67-9d7d-b5d104e36814","subMetas":{"prizebg.png":{"ver":"1.0.1","uuid":"1d4d0649-9ea1-4171-b301-54f1d90aabf5","rawTextureUuid":"7812ab8d-1490-4d67-9d7d-b5d104e36814","type":"texture"},"usebtn.png":{"ver":"1.0.1","uuid":"8b0f2eee-8cb0-4499-ab58-49e7f2caee18","rawTextureUuid":"7812ab8d-1490-4d67-9d7d-b5d104e36814","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"}},"type":"sheet"}
{"ver":"1.0.1","uuid":"58f8ca0c-13b5-4c47-84a9-2bcb3e25c568","subMetas":{"alertbg":{"ver":"1.0.1","uuid":"49fa9d5a-fa33-40e4-b2e1-b00006ee0b2c","rawTextureUuid":"58f8ca0c-13b5-4c47-84a9-2bcb3e25c568","type":"texture"}},"type":"texture","imagePath":"/Users/wanghongyuan/shuijf/assets/singles/alertbg.png"}
{"ver":"1.0.1","uuid":"b89a1d88-1f8f-4c9d-bd76-4682de69d62f","subMetas":{"bg":{"ver":"1.0.1","uuid":"3e8e7daf-380f-4524-998d-6bc955b88298","rawTextureUuid":"b89a1d88-1f8f-4c9d-bd76-4682de69d62f","type":"texture"}},"type":"texture","imagePath":"/Users/wanghongyuan/shuijf/assets/singles/bg.jpg"}
{"ver":"1.0.1","uuid":"ba68c8dd-1e6a-42fc-83b4-a8ca01bd40d2","subMetas":{"cankao":{"ver":"1.0.1","uuid":"f14081bd-8f55-4ce4-a175-849f9512daea","rawTextureUuid":"ba68c8dd-1e6a-42fc-83b4-a8ca01bd40d2","type":"texture"}},"type":"texture","imagePath":"/Users/wanghongyuan/shuijf/assets/singles/cankao.jpg"}
{"ver":"1.0.1","uuid":"d3c3140f-3210-426b-8a0b-c1811f33044f","subMetas":{"closebtn":{"ver":"1.0.1","uuid":"d47189aa-f9fb-4ed8-b4cf-4f1631fe0c33","rawTextureUuid":"d3c3140f-3210-426b-8a0b-c1811f33044f","type":"texture"}},"type":"texture","imagePath":"/Users/wanghongyuan/shuijf/assets/singles/closebtn.png"}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"engineConfig": { "engineConfig": {
"fps": 63, "fps": 63,
"designWidth": 750, "designWidth": 750,
"designHeight": 1334, "designHeight": 1624,
"scaleMode": "fixedWidth", "scaleMode": "fixedWidth",
"modifyCanvasSize": false, "modifyCanvasSize": false,
"resPath": "" "resPath": ""
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
import {registerDef} from 'scilla' import {registerDef} from 'scilla'
import component0 from 'components/animation/TouchZoom'; import component0 from 'components/ui/ScrollView';
registerDef('components/animation/TouchZoom', component0); registerDef('components/ui/ScrollView', component0);
import component1 from 'components/base/Transform'; import component1 from 'components/base/Transform';
registerDef('components/base/Transform', component1); registerDef('components/base/Transform', component1);
...@@ -14,14 +14,14 @@ registerDef('components/base/Transform', component1); ...@@ -14,14 +14,14 @@ registerDef('components/base/Transform', component1);
import component2 from 'components/renderer/HtmlRenderer'; import component2 from 'components/renderer/HtmlRenderer';
registerDef('components/renderer/HtmlRenderer', component2); registerDef('components/renderer/HtmlRenderer', component2);
import component3 from 'components/renderer/TextureRenderer'; import component3 from 'components/base/TouchInterrupt';
registerDef('components/renderer/TextureRenderer', component3); registerDef('components/base/TouchInterrupt', component3);
import component4 from 'components/base/TouchInterrupt'; import component4 from 'components/ui/Button';
registerDef('components/base/TouchInterrupt', component4); registerDef('components/ui/Button', component4);
import component5 from 'components/ui/ScrollView'; import component5 from 'components/animation/TouchZoom';
registerDef('components/ui/ScrollView', component5); registerDef('components/animation/TouchZoom', component5);
import component6 from 'components/other/FullStageSize'; import component6 from 'components/other/FullStageSize';
registerDef('components/other/FullStageSize', component6); registerDef('components/other/FullStageSize', component6);
...@@ -32,14 +32,14 @@ registerDef('components/renderer/TextRenderer', component7); ...@@ -32,14 +32,14 @@ registerDef('components/renderer/TextRenderer', component7);
import component8 from 'components/renderer/RectRenderer'; import component8 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component8); registerDef('components/renderer/RectRenderer', component8);
import component9 from 'components/other/RelativeLayout'; import component9 from 'components/renderer/TextureRenderer';
registerDef('components/other/RelativeLayout', component9); registerDef('components/renderer/TextureRenderer', component9);
import component10 from 'components/other/CameraController'; import component10 from 'components/other/CameraController';
registerDef('components/other/CameraController', component10); registerDef('components/other/CameraController', component10);
import component11 from 'components/ui/Button'; import component11 from 'components/other/RelativeLayout';
registerDef('components/ui/Button', component11); registerDef('components/other/RelativeLayout', component11);
import component12 from '../../assets/scripts/scenes/SceneStart'; import component12 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/scenes/SceneStart', component12); registerDef('./scripts/scenes/SceneStart', component12);
...@@ -47,11 +47,11 @@ registerDef('./scripts/scenes/SceneStart', component12); ...@@ -47,11 +47,11 @@ registerDef('./scripts/scenes/SceneStart', component12);
import component13 from '../../assets/scripts/navigator/SingleSceneNavigator'; import component13 from '../../assets/scripts/navigator/SingleSceneNavigator';
registerDef('./scripts/navigator/SingleSceneNavigator', component13); registerDef('./scripts/navigator/SingleSceneNavigator', component13);
import component14 from '../../assets/scripts/popup/Popup'; import component14 from '../../assets/scripts/scenes/SceneController';
registerDef('./scripts/popup/Popup', component14); registerDef('./scripts/scenes/SceneController', component14);
import component15 from '../../assets/scripts/scenes/SceneController'; import component15 from '../../assets/scripts/popup/Popup';
registerDef('./scripts/scenes/SceneController', component15); registerDef('./scripts/popup/Popup', component15);
import component16 from '../../assets/scripts/api/SampleApi'; import component16 from '../../assets/scripts/api/SampleApi';
registerDef('./scripts/api/SampleApi', component16); registerDef('./scripts/api/SampleApi', component16);
......
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