Commit 64d70ef7 authored by wildfirecode's avatar wildfirecode

1

parent a3945893
......@@ -18,6 +18,14 @@
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "./scripts/scenes/BallItem",
"properties": {}
},
{
"script": "./scripts/scenes/BallItem",
"properties": {}
}
],
"children": [
......
......@@ -3,10 +3,10 @@ import ScillaComponent from 'components/base/ScillaComponent';
import { Transform } from 'scilla-components/src';
export default class BallItem extends ScillaComponent {
speed = 0;
private _speed = 0;
onUpdate() {
const { entity } = this;
this.speed += 1.5;
entity.getComponent(Transform).position.y += this.speed;
this._speed += 1.5;
entity.getComponent(Transform).position.y += this._speed;
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -77,6 +77,6 @@ export default class CameraController extends ScillaComponent {
this.followPosition.setXY(width / 2, height / 2).subtract(this.targetPosition);
position.copyFrom(math.lerpObj(position, this.followPosition, 0.1, Vector2D, ['x', 'y']));
// position.copyFrom(math.lerpObj(position, this.followPosition, 0.1, Vector2D, ['x', 'y']));
}
}
......@@ -10,7 +10,6 @@ import TouchZoom from './animation/TouchZoom';
import Wave from './animation/Wave';
import ZoomLoop from './animation/ZoomLoop';
import InteractComponent from './base/InteractComponent';
import ScillaComponent from './base/ScillaComponent';
import TouchInterrupt from './base/TouchInterrupt';
import Transform from './base/Transform';
import AjaxElementComponent from './net/api/hdtool/base/AjaxElementComponent';
......
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