Commit d28e6846 authored by wildfirecode's avatar wildfirecode

1

parent c8243fe7
......@@ -2,23 +2,41 @@
"name": "BallItem",
"root": {
"uuid": "20190301114308",
components: [
"components": [
{
"script": "components/base/Transform"
},
{
script: 'components/other/CameraController'
},
"script": "components/other/CameraController"
}
],
"children": [
{
"uuid": "20190301114245",
"name": "BallItem",
"components": [
{
"script": "components/base/Transform",
"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 @@
"properties": {
"bulletNumTxt": "entity|f02aa1f7-3255-405e-a537-7ba4ef503aa7",
"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 @@
],
"resource-groups": {
"preload": [
{
"uuid": "8ebdfe78-ea44-445d-8bbe-02a22874e896",
"url": "prefabs/BallItem.pfb"
},
{
"uuid": "e00fab97-a62c-459b-a61b-a9d7a1e10a21",
"url": "sheets/play.sht-disperse",
......
......@@ -7,13 +7,13 @@ import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src';
export default class ScenePlay extends Component implements INavigatorViewBase{
export default class ScenePlay extends Component implements INavigatorViewBase {
BallItemPrefab: resource;
bulletNumTxt:Entity;
strengthNumTxt:Entity;
bulletNumTxt: Entity;
strengthNumTxt: Entity;
getBallItem(){
getBallItem() {
const ball = instantiate(this.BallItemPrefab);
this.entity.addChild(ball);
}
......@@ -24,11 +24,7 @@ export default class ScenePlay extends Component implements INavigatorViewBase{
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
(this.entity.getComponent(Transform) as Transform).alpha = 1;
setTimeout(() => {
this.getBallItem();
}, 3000);
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
......
......@@ -6507,11 +6507,8 @@
_super.prototype.onAwake.call(this);
};
ScenePlay.prototype.onDidEnter = function (last, action, parameters) {
var _this = this;
this.entity.getComponent(Transform).alpha = 1;
setTimeout(function () {
_this.getBallItem();
}, 3000);
this.getBallItem();
};
ScenePlay.prototype.onDidLeave = function (next, action, parameters) {
this.entity.getComponent(Transform).alpha = 0;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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