Commit d28e6846 authored by wildfirecode's avatar wildfirecode

1

parent c8243fe7
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
"name": "BallItem", "name": "BallItem",
"root": { "root": {
"uuid": "20190301114308", "uuid": "20190301114308",
components: [ "components": [
{ {
"script": "components/base/Transform" "script": "components/base/Transform"
}, },
{ {
script: 'components/other/CameraController' "script": "components/other/CameraController"
}, }
], ],
"children": [ "children": [
{ {
...@@ -18,7 +18,25 @@ ...@@ -18,7 +18,25 @@
{ {
"script": "components/base/Transform", "script": "components/base/Transform",
"properties": {} "properties": {}
}, }
],
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|2952264c-5a8b-4eda-9a15-812e4e7738ae"
}
}
],
"uuid": "fb53fa37-a942-4474-901a-582dccd14c93"
}
] ]
} }
] ]
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"properties": { "properties": {
"bulletNumTxt": "entity|f02aa1f7-3255-405e-a537-7ba4ef503aa7", "bulletNumTxt": "entity|f02aa1f7-3255-405e-a537-7ba4ef503aa7",
"strengthNumTxt": "entity|70838016-4fab-4a0f-90aa-61c4303a4ecc", "strengthNumTxt": "entity|70838016-4fab-4a0f-90aa-61c4303a4ecc",
"BallItemPrefab": "res|a245fa14-74f4-4731-91f3-f8a86a27ee24" "BallItemPrefab": "res|8ebdfe78-ea44-445d-8bbe-02a22874e896"
} }
} }
], ],
...@@ -688,6 +688,10 @@ ...@@ -688,6 +688,10 @@
], ],
"resource-groups": { "resource-groups": {
"preload": [ "preload": [
{
"uuid": "8ebdfe78-ea44-445d-8bbe-02a22874e896",
"url": "prefabs/BallItem.pfb"
},
{ {
"uuid": "e00fab97-a62c-459b-a61b-a9d7a1e10a21", "uuid": "e00fab97-a62c-459b-a61b-a9d7a1e10a21",
"url": "sheets/play.sht-disperse", "url": "sheets/play.sht-disperse",
......
...@@ -7,13 +7,13 @@ import { alien } from "../navigator/StackNavigator"; ...@@ -7,13 +7,13 @@ import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator"; import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src'; import { Transform } from 'scilla-components/src';
export default class ScenePlay extends Component implements INavigatorViewBase{ export default class ScenePlay extends Component implements INavigatorViewBase {
BallItemPrefab: resource; BallItemPrefab: resource;
bulletNumTxt:Entity; bulletNumTxt: Entity;
strengthNumTxt:Entity; strengthNumTxt: Entity;
getBallItem(){ getBallItem() {
const ball = instantiate(this.BallItemPrefab); const ball = instantiate(this.BallItemPrefab);
this.entity.addChild(ball); this.entity.addChild(ball);
} }
...@@ -24,11 +24,7 @@ export default class ScenePlay extends Component implements INavigatorViewBase{ ...@@ -24,11 +24,7 @@ export default class ScenePlay extends Component implements INavigatorViewBase{
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void { onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
(this.entity.getComponent(Transform) as Transform).alpha = 1; (this.entity.getComponent(Transform) as Transform).alpha = 1;
this.getBallItem();
setTimeout(() => {
this.getBallItem();
}, 3000);
} }
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void { onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
......
...@@ -6507,11 +6507,8 @@ ...@@ -6507,11 +6507,8 @@
_super.prototype.onAwake.call(this); _super.prototype.onAwake.call(this);
}; };
ScenePlay.prototype.onDidEnter = function (last, action, parameters) { ScenePlay.prototype.onDidEnter = function (last, action, parameters) {
var _this = this;
this.entity.getComponent(Transform).alpha = 1; this.entity.getComponent(Transform).alpha = 1;
setTimeout(function () { this.getBallItem();
_this.getBallItem();
}, 3000);
}; };
ScenePlay.prototype.onDidLeave = function (next, action, parameters) { ScenePlay.prototype.onDidLeave = function (next, action, parameters) {
this.entity.getComponent(Transform).alpha = 0; this.entity.getComponent(Transform).alpha = 0;
......
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