Load bullet part regions (#7663)

* Load bullet part regions

* Unnecessary, just use name in the part
This commit is contained in:
MEEPofFaith
2022-10-05 02:47:09 -07:00
committed by GitHub
parent 5e6d40d6cc
commit 44b73d4c13
2 changed files with 10 additions and 0 deletions

View File

@@ -38,6 +38,8 @@ public class BasicBulletType extends BulletType{
@Override
public void load(){
super.load();
backRegion = Core.atlas.find(backSprite == null ? (sprite + "-back") : backSprite);
frontRegion = Core.atlas.find(sprite);
}

View File

@@ -301,6 +301,14 @@ public class BulletType extends Content implements Cloneable{
}
}
@Override
public void load(){
for(var part : parts){
part.turretShading = false;
part.load(null);
}
}
/** @return estimated damage per shot. this can be very inaccurate. */
public float estimateDPS(){
float sum = damage + splashDamage*0.75f;