Scrapped reaper segments
This commit is contained in:
@@ -37,12 +37,12 @@ public class ArtilleryBulletType extends BasicBulletType{
|
||||
float baseScale = 0.7f;
|
||||
float scale = (baseScale + b.fslope() * (1f - baseScale));
|
||||
|
||||
float height = bulletHeight * ((1f - bulletShrink) + bulletShrink * b.fout());
|
||||
float height = this.height * ((1f - shrinkY) + shrinkY * b.fout());
|
||||
|
||||
Draw.color(backColor);
|
||||
Draw.rect(backRegion, b.x(), b.y(), bulletWidth * scale, height * scale, b.rotation() - 90);
|
||||
Draw.rect(backRegion, b.x(), b.y(), width * scale, height * scale, b.rotation() - 90);
|
||||
Draw.color(frontColor);
|
||||
Draw.rect(frontRegion, b.x(), b.y(), bulletWidth * scale, height * scale, b.rotation() - 90);
|
||||
Draw.rect(frontRegion, b.x(), b.y(), width * scale, height * scale, b.rotation() - 90);
|
||||
Draw.color();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,16 +10,16 @@ import mindustry.graphics.Pal;
|
||||
/** An extended BulletType for most ammo-based bullets shot from turrets and units. */
|
||||
public class BasicBulletType extends BulletType{
|
||||
public Color backColor = Pal.bulletYellowBack, frontColor = Pal.bulletYellow;
|
||||
public float bulletWidth = 5f, bulletHeight = 7f;
|
||||
public float bulletShrink = 0.5f;
|
||||
public String bulletSprite;
|
||||
public float width = 5f, height = 7f;
|
||||
public float shrinkX = 0f, shrinkY = 0.5f;
|
||||
public String sprite;
|
||||
|
||||
public TextureRegion backRegion;
|
||||
public TextureRegion frontRegion;
|
||||
|
||||
public BasicBulletType(float speed, float damage, String bulletSprite){
|
||||
super(speed, damage);
|
||||
this.bulletSprite = bulletSprite;
|
||||
this.sprite = bulletSprite;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,18 +34,19 @@ public class BasicBulletType extends BulletType{
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
backRegion = Core.atlas.find(bulletSprite + "-back");
|
||||
frontRegion = Core.atlas.find(bulletSprite);
|
||||
backRegion = Core.atlas.find(sprite + "-back");
|
||||
frontRegion = Core.atlas.find(sprite);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bulletc b){
|
||||
float height = bulletHeight * ((1f - bulletShrink) + bulletShrink * b.fout());
|
||||
float height = this.height * ((1f - shrinkY) + shrinkY * b.fout());
|
||||
float width = this.width * ((1f - shrinkX) + shrinkX * b.fout());
|
||||
|
||||
Draw.color(backColor);
|
||||
Draw.rect(backRegion, b.x(), b.y(), bulletWidth, height, b.rotation() - 90);
|
||||
Draw.rect(backRegion, b.x(), b.y(), width, height, b.rotation() - 90);
|
||||
Draw.color(frontColor);
|
||||
Draw.rect(frontRegion, b.x(), b.y(), bulletWidth, height, b.rotation() - 90);
|
||||
Draw.rect(frontRegion, b.x(), b.y(), width, height, b.rotation() - 90);
|
||||
Draw.color();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public class BombBulletType extends BasicBulletType{
|
||||
splashDamage = damage;
|
||||
collidesTiles = false;
|
||||
collides = false;
|
||||
bulletShrink = 0.7f;
|
||||
shrinkY = 0.7f;
|
||||
lifetime = 30f;
|
||||
drag = 0.05f;
|
||||
keepVelocity = false;
|
||||
|
||||
@@ -13,8 +13,8 @@ public class FlakBulletType extends BasicBulletType{
|
||||
splashDamage = 15f;
|
||||
splashDamageRadius = 34f;
|
||||
hitEffect = Fx.flakExplosionBig;
|
||||
bulletWidth = 8f;
|
||||
bulletHeight = 10f;
|
||||
width = 8f;
|
||||
height = 10f;
|
||||
collidesGround = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
private UnitController controller;
|
||||
private UnitType type;
|
||||
boolean spawnedByCore;
|
||||
float animation;
|
||||
|
||||
public void moveAt(Vec2 vector){
|
||||
moveAt(vector, type.accel);
|
||||
|
||||
Reference in New Issue
Block a user