mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-26 04:31:40 +00:00
27 lines
821 B
Haxe
27 lines
821 B
Haxe
package shapes;
|
|
|
|
import src.DtsObject;
|
|
|
|
class SuperJump extends PowerUp {
|
|
public function new() {
|
|
super();
|
|
this.dtsPath = "data/shapes/items/superjump.dts";
|
|
this.isCollideable = false;
|
|
this.isTSStatic = false;
|
|
this.identifier = "SuperJump";
|
|
}
|
|
|
|
public function pickUp():Bool {
|
|
return this.level.pickUpPowerUp(this);
|
|
}
|
|
|
|
public function use(time:Float) {
|
|
var marble = this.level.marble;
|
|
marble.velocity = marble.velocity.add(this.level.currentUp.multiply(20));
|
|
// marble.body.addLinearVelocity(this.level.currentUp.scale(20)); // Simply add to vertical velocity
|
|
// if (!this.level.rewinding)
|
|
// AudioManager.play(this.sounds[1]);
|
|
// this.level.particles.createEmitter(superJumpParticleOptions, null, () => Util.vecOimoToThree(marble.body.getPosition()));
|
|
// this.level.deselectPowerUp();
|
|
}
|
|
}
|