mirror of
https://github.com/Febbweiss/sis.git
synced 2026-03-05 06:35:37 +00:00
Refactoring: better way to manage weapons
This commit is contained in:
@@ -256,7 +256,7 @@ Game = {
|
||||
var bonus = $(this)[0].bonus;
|
||||
if( collisions.length > 0 ) {
|
||||
if( bonus.type === "weapon" ) {
|
||||
Game.ship.weapon = new bonus.clazz;
|
||||
Game.ship.weapon = new Weapon(bonus.clazz);
|
||||
$("#current_weapon").setAnimation(bonus.animation.animation);
|
||||
this.remove();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user