This commit is contained in:
Dominic Szablewski
2021-09-13 09:34:08 +02:00
commit a844ba46f8
95 changed files with 11727 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
class entity_projectile_gib_t extends entity_t {
_init() {
this._texture = 18;
this._bounciness = 0;
this._die_at = game_time + 2;
this._model = model_gib;
this._yaw = Math.random();
this._pitch = Math.random();
}
_update() {
super._update_physics();
this._draw_model();
this.f = this._on_ground ? 15 : 0;
}
_did_collide(axis) {
if (axis == 1 && this.v.y < -128) {
this._play_sound(sfx_enemy_hit);
}
}
_did_collide_with_entity(other) {
other._receive_damage(this, 10);
this._kill();
}
}