Fix Gun Dropper bug
This commit is contained in:
parent
45b6cf5d9f
commit
bac1c0227d
@ -41,6 +41,9 @@ namespace Saltosion.OneWeapon.Environment {
|
||||
}
|
||||
|
||||
public void ExpelGun() {
|
||||
if (GunsLeft <= 0) {
|
||||
return;
|
||||
}
|
||||
GameObject Gun = PossibleGuns[Util.RandomValueBetween(0, PossibleGuns.Count - 1)];
|
||||
GameObject ShotGun = GameObject.Instantiate(Gun, HoleTransform.position, new Quaternion());
|
||||
Rigidbody2D Body = ShotGun.GetComponent<Rigidbody2D>();
|
||||
@ -58,10 +61,9 @@ namespace Saltosion.OneWeapon.Environment {
|
||||
if (GunsLeft == 0) {
|
||||
if (ExplodeOnEmpty) {
|
||||
Explodable.Explode(true);
|
||||
} else {
|
||||
}
|
||||
Destroy(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user