Property cleanup
This commit is contained in:
@@ -760,7 +760,7 @@ public class UnitTypes implements ContentList{
|
|||||||
ejectEffect = Fx.casing1;
|
ejectEffect = Fx.casing1;
|
||||||
shootSound = Sounds.artillery;
|
shootSound = Sounds.artillery;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
occlusion = 8f;
|
shadow = 8f;
|
||||||
recoil = 3f;
|
recoil = 3f;
|
||||||
|
|
||||||
bullet = new ArtilleryBulletType(2f, 12){{
|
bullet = new ArtilleryBulletType(2f, 12){{
|
||||||
@@ -827,7 +827,7 @@ public class UnitTypes implements ContentList{
|
|||||||
ejectEffect = Fx.casing1;
|
ejectEffect = Fx.casing1;
|
||||||
shootSound = Sounds.shootBig;
|
shootSound = Sounds.shootBig;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
occlusion = 12f;
|
shadow = 12f;
|
||||||
recoil = 3f;
|
recoil = 3f;
|
||||||
shots = 2;
|
shots = 2;
|
||||||
spacing = 17f;
|
spacing = 17f;
|
||||||
@@ -859,7 +859,7 @@ public class UnitTypes implements ContentList{
|
|||||||
ejectEffect = Fx.casing3;
|
ejectEffect = Fx.casing3;
|
||||||
shootSound = Sounds.artillery;
|
shootSound = Sounds.artillery;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
occlusion = 30f;
|
shadow = 30f;
|
||||||
|
|
||||||
bullet = new ArtilleryBulletType(3f, 50){{
|
bullet = new ArtilleryBulletType(3f, 50){{
|
||||||
hitEffect = Fx.sapExplosion;
|
hitEffect = Fx.sapExplosion;
|
||||||
@@ -1061,7 +1061,7 @@ public class UnitTypes implements ContentList{
|
|||||||
bullet = missiles;
|
bullet = missiles;
|
||||||
shootSound = Sounds.missile;
|
shootSound = Sounds.missile;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
occlusion = 6f;
|
shadow = 6f;
|
||||||
}},
|
}},
|
||||||
new Weapon("missiles-mount"){{
|
new Weapon("missiles-mount"){{
|
||||||
y = -8f;
|
y = -8f;
|
||||||
@@ -1072,7 +1072,7 @@ public class UnitTypes implements ContentList{
|
|||||||
bullet = missiles;
|
bullet = missiles;
|
||||||
shootSound = Sounds.missile;
|
shootSound = Sounds.missile;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
occlusion = 6f;
|
shadow = 6f;
|
||||||
}},
|
}},
|
||||||
new Weapon("large-bullet-mount"){{
|
new Weapon("large-bullet-mount"){{
|
||||||
y = 2f;
|
y = 2f;
|
||||||
@@ -1084,7 +1084,7 @@ public class UnitTypes implements ContentList{
|
|||||||
ejectEffect = Fx.casing1;
|
ejectEffect = Fx.casing1;
|
||||||
shootSound = Sounds.shootBig;
|
shootSound = Sounds.shootBig;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
occlusion = 8f;
|
shadow = 8f;
|
||||||
bullet = new BasicBulletType(7f, 50){{
|
bullet = new BasicBulletType(7f, 50){{
|
||||||
width = 12f;
|
width = 12f;
|
||||||
height = 18f;
|
height = 18f;
|
||||||
@@ -1132,7 +1132,7 @@ public class UnitTypes implements ContentList{
|
|||||||
reload = 45f;
|
reload = 45f;
|
||||||
recoil = 4f;
|
recoil = 4f;
|
||||||
shootSound = Sounds.laser;
|
shootSound = Sounds.laser;
|
||||||
occlusion = 20f;
|
shadow = 20f;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
|
|
||||||
bullet = new LaserBulletType(){{
|
bullet = new LaserBulletType(){{
|
||||||
@@ -1152,7 +1152,7 @@ public class UnitTypes implements ContentList{
|
|||||||
rotateSpeed = 2f;
|
rotateSpeed = 2f;
|
||||||
reload = 9f;
|
reload = 9f;
|
||||||
shootSound = Sounds.shoot;
|
shootSound = Sounds.shoot;
|
||||||
occlusion = 7f;
|
shadow = 7f;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
recoil = 0.5f;
|
recoil = 0.5f;
|
||||||
|
|
||||||
@@ -1167,7 +1167,7 @@ public class UnitTypes implements ContentList{
|
|||||||
shake = 1f;
|
shake = 1f;
|
||||||
shootSound = Sounds.shoot;
|
shootSound = Sounds.shoot;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
occlusion = 12f;
|
shadow = 12f;
|
||||||
bullet = fragBullet;
|
bullet = fragBullet;
|
||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
@@ -1519,7 +1519,7 @@ public class UnitTypes implements ContentList{
|
|||||||
shootY = 7f;
|
shootY = 7f;
|
||||||
shake = 5f;
|
shake = 5f;
|
||||||
recoil = 4f;
|
recoil = 4f;
|
||||||
occlusion = 12f;
|
shadow = 12f;
|
||||||
|
|
||||||
shots = 1;
|
shots = 1;
|
||||||
inaccuracy = 3f;
|
inaccuracy = 3f;
|
||||||
@@ -1555,7 +1555,7 @@ public class UnitTypes implements ContentList{
|
|||||||
x = 8.5f;
|
x = 8.5f;
|
||||||
y = -9f;
|
y = -9f;
|
||||||
|
|
||||||
occlusion = 6f;
|
shadow = 6f;
|
||||||
|
|
||||||
rotateSpeed = 4f;
|
rotateSpeed = 4f;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
@@ -1611,7 +1611,7 @@ public class UnitTypes implements ContentList{
|
|||||||
rotateSpeed = 4f;
|
rotateSpeed = 4f;
|
||||||
mirror = false;
|
mirror = false;
|
||||||
|
|
||||||
occlusion = 20f;
|
shadow = 20f;
|
||||||
|
|
||||||
shootY = 2f;
|
shootY = 2f;
|
||||||
recoil = 4f;
|
recoil = 4f;
|
||||||
@@ -1657,7 +1657,7 @@ public class UnitTypes implements ContentList{
|
|||||||
shootY = 7f;
|
shootY = 7f;
|
||||||
shake = 2f;
|
shake = 2f;
|
||||||
recoil = 3f;
|
recoil = 3f;
|
||||||
occlusion = 12f;
|
shadow = 12f;
|
||||||
ejectEffect = Fx.casing3;
|
ejectEffect = Fx.casing3;
|
||||||
shootSound = Sounds.shootBig;
|
shootSound = Sounds.shootBig;
|
||||||
|
|
||||||
@@ -1703,7 +1703,7 @@ public class UnitTypes implements ContentList{
|
|||||||
shootY = 23f;
|
shootY = 23f;
|
||||||
shake = 6f;
|
shake = 6f;
|
||||||
recoil = 10.5f;
|
recoil = 10.5f;
|
||||||
occlusion = 50f;
|
shadow = 50f;
|
||||||
shootSound = Sounds.railgun;
|
shootSound = Sounds.railgun;
|
||||||
|
|
||||||
shots = 1;
|
shots = 1;
|
||||||
|
|||||||
@@ -186,14 +186,14 @@ public class World{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call to signify the beginning of map loading.
|
* Call to signify the beginning of map loading.
|
||||||
* BuildinghangeEvents will not be fired until endMapLoad().
|
* TileEvents will not be fired until endMapLoad().
|
||||||
*/
|
*/
|
||||||
public void beginMapLoad(){
|
public void beginMapLoad(){
|
||||||
generating = true;
|
generating = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call to signify the end of map loading. Updates tile occlusions and sets up physics for the world.
|
* Call to signify the end of map loading. Updates tile proximities and sets up physics for the world.
|
||||||
* A WorldLoadEvent will be fire.
|
* A WorldLoadEvent will be fire.
|
||||||
*/
|
*/
|
||||||
public void endMapLoad(){
|
public void endMapLoad(){
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
|
|
||||||
public Seq<Weapon> weapons = new Seq<>();
|
public Seq<Weapon> weapons = new Seq<>();
|
||||||
public TextureRegion baseRegion, legRegion, region, shadowRegion, cellRegion,
|
public TextureRegion baseRegion, legRegion, region, shadowRegion, cellRegion,
|
||||||
occlusionRegion, jointRegion, footRegion, legBaseRegion, baseJointRegion, outlineRegion;
|
softShadowRegion, jointRegion, footRegion, legBaseRegion, baseJointRegion, outlineRegion;
|
||||||
public TextureRegion[] wreckRegions;
|
public TextureRegion[] wreckRegions;
|
||||||
|
|
||||||
protected @Nullable ItemStack[] cachedRequirements;
|
protected @Nullable ItemStack[] cachedRequirements;
|
||||||
@@ -351,7 +351,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
legBaseRegion = Core.atlas.find(name + "-leg-base", name + "-leg");
|
legBaseRegion = Core.atlas.find(name + "-leg-base", name + "-leg");
|
||||||
baseRegion = Core.atlas.find(name + "-base");
|
baseRegion = Core.atlas.find(name + "-base");
|
||||||
cellRegion = Core.atlas.find(name + "-cell", Core.atlas.find("power-cell"));
|
cellRegion = Core.atlas.find(name + "-cell", Core.atlas.find("power-cell"));
|
||||||
occlusionRegion = Core.atlas.find("circle-shadow");
|
softShadowRegion = Core.atlas.find("circle-shadow");
|
||||||
outlineRegion = Core.atlas.find(name + "-outline");
|
outlineRegion = Core.atlas.find(name + "-outline");
|
||||||
shadowRegion = icon(Cicon.full);
|
shadowRegion = icon(Cicon.full);
|
||||||
|
|
||||||
@@ -439,7 +439,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
drawPayload((Unit & Payloadc)unit);
|
drawPayload((Unit & Payloadc)unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
drawOcclusion(unit);
|
drawSoftShadow(unit);
|
||||||
|
|
||||||
Draw.z(z - outlineSpace);
|
Draw.z(z - outlineSpace);
|
||||||
|
|
||||||
@@ -501,11 +501,11 @@ public class UnitType extends UnlockableContent{
|
|||||||
Draw.color();
|
Draw.color();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawOcclusion(Unit unit){
|
public void drawSoftShadow(Unit unit){
|
||||||
Draw.color(0, 0, 0, 0.4f);
|
Draw.color(0, 0, 0, 0.4f);
|
||||||
float rad = 1.6f;
|
float rad = 1.6f;
|
||||||
float size = Math.max(region.width, region.height) * Draw.scl;
|
float size = Math.max(region.width, region.height) * Draw.scl;
|
||||||
Draw.rect(occlusionRegion, unit, size * rad, size * rad);
|
Draw.rect(softShadowRegion, unit, size * rad, size * rad);
|
||||||
Draw.color();
|
Draw.color();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -580,8 +580,8 @@ public class UnitType extends UnlockableContent{
|
|||||||
float wx = unit.x + Angles.trnsx(rotation, weapon.x, weapon.y) + Angles.trnsx(weaponRotation, 0, recoil),
|
float wx = unit.x + Angles.trnsx(rotation, weapon.x, weapon.y) + Angles.trnsx(weaponRotation, 0, recoil),
|
||||||
wy = unit.y + Angles.trnsy(rotation, weapon.x, weapon.y) + Angles.trnsy(weaponRotation, 0, recoil);
|
wy = unit.y + Angles.trnsy(rotation, weapon.x, weapon.y) + Angles.trnsy(weaponRotation, 0, recoil);
|
||||||
|
|
||||||
if(weapon.occlusion > 0){
|
if(weapon.shadow > 0){
|
||||||
Drawf.shadow(wx, wy, weapon.occlusion);
|
Drawf.shadow(wx, wy, weapon.shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(weapon.outlineRegion.found()){
|
if(weapon.outlineRegion.found()){
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ public class Weapon{
|
|||||||
public float x = 5f, y = 0f;
|
public float x = 5f, y = 0f;
|
||||||
/** random spread on the X axis */
|
/** random spread on the X axis */
|
||||||
public float xRand = 0f;
|
public float xRand = 0f;
|
||||||
/** radius of occlusion drawn under the weapon; <0 to disable */
|
/** radius of shadow drawn under the weapon; <0 to disable */
|
||||||
public float occlusion = -1f;
|
public float shadow = -1f;
|
||||||
/** fraction of velocity that is random */
|
/** fraction of velocity that is random */
|
||||||
public float velocityRnd = 0f;
|
public float velocityRnd = 0f;
|
||||||
/** delay in ticks between shots */
|
/** delay in ticks between shots */
|
||||||
|
|||||||
Reference in New Issue
Block a user