Commit bbbdbae3 authored by wildfirecode's avatar wildfirecode

1

parent c459edba
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
{ {
"script": "./scripts/scenes/BallItem", "script": "./scripts/scenes/BallItem",
"properties": {} "properties": {}
},
{
"script": "./scripts/scenes/testC",
"properties": {}
} }
], ],
"children": [ "children": [
......
...@@ -8,5 +8,6 @@ export default class BallItem extends ScillaComponent { ...@@ -8,5 +8,6 @@ export default class BallItem extends ScillaComponent {
const { entity } = this; const { entity } = this;
this._speed += 1.5; this._speed += 1.5;
entity.getComponent(Transform).position.y += this._speed; entity.getComponent(Transform).position.y += this._speed;
console.log('BallItem onUpdate')
} }
} }
\ No newline at end of file
import ScillaComponent from 'scilla-components/src/base/ScillaComponent';
export default class testC extends ScillaComponent{
onAwake(){
super.onAwake();
console.log('im testC')
}
onUpdate(t){
super.onUpdate(t);
}
}
{"ver":"1.0.1","uuid":"3271100c-b1f8-4443-9b90-421ec1c36fcd","subMetas":{},"type":"script"}
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