scripting improvements

This commit is contained in:
2026-05-08 22:46:24 -05:00
parent 1ff990ff44
commit 7415944e0a
24 changed files with 1098 additions and 310 deletions
+10 -17
View File
@@ -7,30 +7,23 @@ function MoveCubeCutscene(params) {
var startX = this.cube.position.position.x;
// this.animLeft = new Animation([
// { time: 0.0, value: startX, easing: Easing.outQuad },
// { time: DURATION, value: startX - SPEED * DURATION }
// ]);
this.anim = new Animation([
[
{ time: 0.0, value: startX, easing: Easing.outQuad },
{ time: DURATION, value: startX - SPEED * DURATION, easing: Easing.inOutQuad },
{ time: DURATION * 2, value: startX }
]
]);
// this.animRight = new Animation([
// { time: 0.0, value: startX - SPEED * DURATION, easing: Easing.inOutQuad },
// { time: DURATION, value: startX }
// ]);
this.anim.onComplete = function() { Cutscene.finish(); };
}
MoveCubeCutscene.prototype = Object.create(Cutscene.prototype);
MoveCubeCutscene.prototype.constructor = MoveCubeCutscene;
MoveCubeCutscene.prototype.update = function() {
Cutscene.finish();
// if(!this.animLeft.complete) {
// this.cube.position.position.x = this.animLeft.update(TIME.delta);
// } else {
// this.cube.position.position.x = this.animRight.update(TIME.delta);
// if(this.animRight.complete) {
// Cutscene.finish();
// }
// }
this.anim.update(TIME.delta);
this.cube.position.position.x = this.anim.properties[0].value;
};
module = MoveCubeCutscene;