mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-03 22:21:17 +07:00
Property cleanup
This commit is contained in:
parent
6983f57459
commit
7c80af85e3
@ -760,7 +760,7 @@ public class UnitTypes implements ContentList{
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.artillery;
|
||||
rotate = true;
|
||||
occlusion = 8f;
|
||||
shadow = 8f;
|
||||
recoil = 3f;
|
||||
|
||||
bullet = new ArtilleryBulletType(2f, 12){{
|
||||
@ -827,7 +827,7 @@ public class UnitTypes implements ContentList{
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.shootBig;
|
||||
rotate = true;
|
||||
occlusion = 12f;
|
||||
shadow = 12f;
|
||||
recoil = 3f;
|
||||
shots = 2;
|
||||
spacing = 17f;
|
||||
@ -859,7 +859,7 @@ public class UnitTypes implements ContentList{
|
||||
ejectEffect = Fx.casing3;
|
||||
shootSound = Sounds.artillery;
|
||||
rotate = true;
|
||||
occlusion = 30f;
|
||||
shadow = 30f;
|
||||
|
||||
bullet = new ArtilleryBulletType(3f, 50){{
|
||||
hitEffect = Fx.sapExplosion;
|
||||
@ -1061,7 +1061,7 @@ public class UnitTypes implements ContentList{
|
||||
bullet = missiles;
|
||||
shootSound = Sounds.missile;
|
||||
rotate = true;
|
||||
occlusion = 6f;
|
||||
shadow = 6f;
|
||||
}},
|
||||
new Weapon("missiles-mount"){{
|
||||
y = -8f;
|
||||
@ -1072,7 +1072,7 @@ public class UnitTypes implements ContentList{
|
||||
bullet = missiles;
|
||||
shootSound = Sounds.missile;
|
||||
rotate = true;
|
||||
occlusion = 6f;
|
||||
shadow = 6f;
|
||||
}},
|
||||
new Weapon("large-bullet-mount"){{
|
||||
y = 2f;
|
||||
@ -1084,7 +1084,7 @@ public class UnitTypes implements ContentList{
|
||||
ejectEffect = Fx.casing1;
|
||||
shootSound = Sounds.shootBig;
|
||||
rotate = true;
|
||||
occlusion = 8f;
|
||||
shadow = 8f;
|
||||
bullet = new BasicBulletType(7f, 50){{
|
||||
width = 12f;
|
||||
height = 18f;
|
||||
@ -1132,7 +1132,7 @@ public class UnitTypes implements ContentList{
|
||||
reload = 45f;
|
||||
recoil = 4f;
|
||||
shootSound = Sounds.laser;
|
||||
occlusion = 20f;
|
||||
shadow = 20f;
|
||||
rotate = true;
|
||||
|
||||
bullet = new LaserBulletType(){{
|
||||
@ -1152,7 +1152,7 @@ public class UnitTypes implements ContentList{
|
||||
rotateSpeed = 2f;
|
||||
reload = 9f;
|
||||
shootSound = Sounds.shoot;
|
||||
occlusion = 7f;
|
||||
shadow = 7f;
|
||||
rotate = true;
|
||||
recoil = 0.5f;
|
||||
|
||||
@ -1167,7 +1167,7 @@ public class UnitTypes implements ContentList{
|
||||
shake = 1f;
|
||||
shootSound = Sounds.shoot;
|
||||
rotate = true;
|
||||
occlusion = 12f;
|
||||
shadow = 12f;
|
||||
bullet = fragBullet;
|
||||
}});
|
||||
}};
|
||||
@ -1519,7 +1519,7 @@ public class UnitTypes implements ContentList{
|
||||
shootY = 7f;
|
||||
shake = 5f;
|
||||
recoil = 4f;
|
||||
occlusion = 12f;
|
||||
shadow = 12f;
|
||||
|
||||
shots = 1;
|
||||
inaccuracy = 3f;
|
||||
@ -1555,7 +1555,7 @@ public class UnitTypes implements ContentList{
|
||||
x = 8.5f;
|
||||
y = -9f;
|
||||
|
||||
occlusion = 6f;
|
||||
shadow = 6f;
|
||||
|
||||
rotateSpeed = 4f;
|
||||
rotate = true;
|
||||
@ -1611,7 +1611,7 @@ public class UnitTypes implements ContentList{
|
||||
rotateSpeed = 4f;
|
||||
mirror = false;
|
||||
|
||||
occlusion = 20f;
|
||||
shadow = 20f;
|
||||
|
||||
shootY = 2f;
|
||||
recoil = 4f;
|
||||
@ -1657,7 +1657,7 @@ public class UnitTypes implements ContentList{
|
||||
shootY = 7f;
|
||||
shake = 2f;
|
||||
recoil = 3f;
|
||||
occlusion = 12f;
|
||||
shadow = 12f;
|
||||
ejectEffect = Fx.casing3;
|
||||
shootSound = Sounds.shootBig;
|
||||
|
||||
@ -1703,7 +1703,7 @@ public class UnitTypes implements ContentList{
|
||||
shootY = 23f;
|
||||
shake = 6f;
|
||||
recoil = 10.5f;
|
||||
occlusion = 50f;
|
||||
shadow = 50f;
|
||||
shootSound = Sounds.railgun;
|
||||
|
||||
shots = 1;
|
||||
|
@ -186,14 +186,14 @@ public class World{
|
||||
|
||||
/**
|
||||
* 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(){
|
||||
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.
|
||||
*/
|
||||
public void endMapLoad(){
|
||||
|
@ -106,7 +106,7 @@ public class UnitType extends UnlockableContent{
|
||||
|
||||
public Seq<Weapon> weapons = new Seq<>();
|
||||
public TextureRegion baseRegion, legRegion, region, shadowRegion, cellRegion,
|
||||
occlusionRegion, jointRegion, footRegion, legBaseRegion, baseJointRegion, outlineRegion;
|
||||
softShadowRegion, jointRegion, footRegion, legBaseRegion, baseJointRegion, outlineRegion;
|
||||
public TextureRegion[] wreckRegions;
|
||||
|
||||
protected @Nullable ItemStack[] cachedRequirements;
|
||||
@ -351,7 +351,7 @@ public class UnitType extends UnlockableContent{
|
||||
legBaseRegion = Core.atlas.find(name + "-leg-base", name + "-leg");
|
||||
baseRegion = Core.atlas.find(name + "-base");
|
||||
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");
|
||||
shadowRegion = icon(Cicon.full);
|
||||
|
||||
@ -439,7 +439,7 @@ public class UnitType extends UnlockableContent{
|
||||
drawPayload((Unit & Payloadc)unit);
|
||||
}
|
||||
|
||||
drawOcclusion(unit);
|
||||
drawSoftShadow(unit);
|
||||
|
||||
Draw.z(z - outlineSpace);
|
||||
|
||||
@ -501,11 +501,11 @@ public class UnitType extends UnlockableContent{
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
public void drawOcclusion(Unit unit){
|
||||
public void drawSoftShadow(Unit unit){
|
||||
Draw.color(0, 0, 0, 0.4f);
|
||||
float rad = 1.6f;
|
||||
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();
|
||||
}
|
||||
|
||||
@ -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),
|
||||
wy = unit.y + Angles.trnsy(rotation, weapon.x, weapon.y) + Angles.trnsy(weaponRotation, 0, recoil);
|
||||
|
||||
if(weapon.occlusion > 0){
|
||||
Drawf.shadow(wx, wy, weapon.occlusion);
|
||||
if(weapon.shadow > 0){
|
||||
Drawf.shadow(wx, wy, weapon.shadow);
|
||||
}
|
||||
|
||||
if(weapon.outlineRegion.found()){
|
||||
|
@ -50,8 +50,8 @@ public class Weapon{
|
||||
public float x = 5f, y = 0f;
|
||||
/** random spread on the X axis */
|
||||
public float xRand = 0f;
|
||||
/** radius of occlusion drawn under the weapon; <0 to disable */
|
||||
public float occlusion = -1f;
|
||||
/** radius of shadow drawn under the weapon; <0 to disable */
|
||||
public float shadow = -1f;
|
||||
/** fraction of velocity that is random */
|
||||
public float velocityRnd = 0f;
|
||||
/** delay in ticks between shots */
|
||||
|
Loading…
Reference in New Issue
Block a user