Files

29 lines
601 B
JavaScript

// Copyright (c) 2026 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
class Player extends Entity {
constructor() {
super();
this.position = this.add(POSITION);
this.position.setLocalPosition(0.0, 2.0, 0.0);
this.physics = this.add(PHYSICS);
this.physics.setShape(PHYSICS_SHAPE_CAPSULE, 0.5, 0.5);
this.renderable = this.add(RENDERABLE);
this.renderable.setMesh(0, MESH_CAPSULE);
this.renderable.setColor(0, 0, 255, 255);
this.add(PLAYER);
}
dispose() {
}
}
module.exports = Player;