Major turret and bullet refactoring // New effects
This commit is contained in:
@@ -1,15 +1,32 @@
|
||||
package io.anuke.mindustry.resource;
|
||||
|
||||
import io.anuke.mindustry.entities.bullets.BulletType;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.entities.BulletType;
|
||||
|
||||
public class AmmoType {
|
||||
private static int lastID = 0;
|
||||
private static Array<AmmoType> allTypes = new Array<>();
|
||||
|
||||
public final byte id;
|
||||
public final Item item;
|
||||
public final BulletType bullet;
|
||||
public final int multiplier;
|
||||
public final int quantityMultiplier;
|
||||
public final float speedMultiplier;
|
||||
|
||||
public AmmoType(Item item, BulletType result, int multiplier){
|
||||
public AmmoType(Item item, BulletType result, int multiplier, float speedMultiplier){
|
||||
this.item = item;
|
||||
this.bullet = result;
|
||||
this.multiplier = multiplier;
|
||||
this.quantityMultiplier = multiplier;
|
||||
this.speedMultiplier = speedMultiplier;
|
||||
this.id = (byte)(lastID++);
|
||||
allTypes.add(this);
|
||||
}
|
||||
|
||||
public static Array<AmmoType> getAllTypes() {
|
||||
return allTypes;
|
||||
}
|
||||
|
||||
public static AmmoType getByID(byte id){
|
||||
return allTypes.get(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package io.anuke.mindustry.resource;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.entities.Bullet;
|
||||
import io.anuke.mindustry.entities.bullets.BulletType;
|
||||
import io.anuke.mindustry.entities.BulletType;
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.mindustry.entities.Unit;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
|
||||
Reference in New Issue
Block a user