Files
q1k3/source/entity_pickup.js
T
Dominic Szablewski a844ba46f8 Initial
2021-09-13 10:09:54 +02:00

19 lines
318 B
JavaScript

class entity_pickup_t extends entity_t {
_init() {
this._model = model_pickup_box;
this.s = vec3(12,12,12);
this._yaw += Math.PI/2;
}
_update() {
if (!this._on_ground) {
this._update_physics();
}
this._draw_model();
if (vec3_dist(this.p, game_entity_player.p) < 40) {
this._pickup();
}
}
}