Improved VTOL animation, made power nodes circular
BIN
core/assets-raw/sprites/blocks/extra/nuclearreactor-shadow.png
Normal file
After Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 170 B |
BIN
core/assets-raw/sprites/blocks/extra/shadow-2.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
core/assets-raw/sprites/blocks/extra/shadow-3.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
core/assets-raw/sprites/blocks/extra/shadow-4.png
Normal file
After Width: | Height: | Size: 195 B |
BIN
core/assets-raw/sprites/blocks/extra/shadow-5.png
Normal file
After Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 617 B |
BIN
core/assets-raw/sprites/blocks/power/powernode-shadow.png
Normal file
After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 258 B |
BIN
core/assets-raw/sprites/blocks/power/powernodelarge-shadow.png
Normal file
After Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 393 B |
BIN
core/assets-raw/sprites/units/vtol-flame.png
Normal file
After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 107 KiB |
@ -85,13 +85,16 @@ public class PowerBlocks {
|
|||||||
hasItems = false;
|
hasItems = false;
|
||||||
}},
|
}},
|
||||||
|
|
||||||
powernode = new PowerDistributor("powernode"),
|
powernode = new PowerDistributor("powernode"){{
|
||||||
|
shadow = "powernode-shadow";
|
||||||
|
}},
|
||||||
|
|
||||||
powernodelarge = new PowerDistributor("powernodelarge"){{
|
powernodelarge = new PowerDistributor("powernodelarge"){{
|
||||||
size = 2;
|
size = 2;
|
||||||
powerSpeed = 1f;
|
powerSpeed = 1f;
|
||||||
maxNodes = 5;
|
maxNodes = 5;
|
||||||
laserRange = 7.5f;
|
laserRange = 7.5f;
|
||||||
|
shadow = "powernodelarge-shadow";
|
||||||
}},
|
}},
|
||||||
|
|
||||||
teleporter = new Teleporter("teleporter");
|
teleporter = new Teleporter("teleporter");
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package io.anuke.mindustry.entities.units.types;
|
package io.anuke.mindustry.entities.units.types;
|
||||||
|
|
||||||
import com.badlogic.gdx.graphics.Color;
|
|
||||||
import io.anuke.mindustry.content.AmmoTypes;
|
import io.anuke.mindustry.content.AmmoTypes;
|
||||||
import io.anuke.mindustry.entities.Unit;
|
import io.anuke.mindustry.entities.Unit;
|
||||||
import io.anuke.mindustry.entities.units.BaseUnit;
|
import io.anuke.mindustry.entities.units.BaseUnit;
|
||||||
@ -8,7 +7,6 @@ import io.anuke.mindustry.entities.units.FlyingUnitType;
|
|||||||
import io.anuke.mindustry.graphics.Palette;
|
import io.anuke.mindustry.graphics.Palette;
|
||||||
import io.anuke.ucore.core.Timers;
|
import io.anuke.ucore.core.Timers;
|
||||||
import io.anuke.ucore.graphics.Draw;
|
import io.anuke.ucore.graphics.Draw;
|
||||||
import io.anuke.ucore.graphics.Fill;
|
|
||||||
import io.anuke.ucore.util.Angles;
|
import io.anuke.ucore.util.Angles;
|
||||||
import io.anuke.ucore.util.Mathf;
|
import io.anuke.ucore.util.Mathf;
|
||||||
|
|
||||||
@ -26,33 +24,21 @@ public class Vtol extends FlyingUnitType {
|
|||||||
for(int i : Mathf.signs) {
|
for(int i : Mathf.signs) {
|
||||||
|
|
||||||
float rotation = unit.rotation - 90;
|
float rotation = unit.rotation - 90;
|
||||||
float dx = 5f * i, dx2 = 6f * i;
|
float scl = 0.7f + Mathf.absin(Timers.time(), 3f, 0.2f);
|
||||||
float dy = 4f, dy2 = -5f;
|
float dx = 5f * i*scl, dx2 = 6f * i*scl;
|
||||||
|
float dy = 4f*scl, dy2 = -5f*scl;
|
||||||
|
|
||||||
float rad = 1.5f + Mathf.absin(Timers.time(), 3f, 0.6f);
|
Draw.color(Palette.lighterOrange, Palette.lightFlame, Mathf.absin(Timers.time(), 3f, 0.7f));
|
||||||
float ds = 1.2f;
|
|
||||||
|
|
||||||
Draw.color(Palette.lightishOrange, Palette.lightFlame, Mathf.absin(Timers.time(), 3f, 0.3f));
|
Draw.rect("vtol-flame",
|
||||||
|
|
||||||
Fill.circle(
|
|
||||||
unit.x + Angles.trnsx(rotation, dx, dy),
|
unit.x + Angles.trnsx(rotation, dx, dy),
|
||||||
unit.y + Angles.trnsy(rotation, dx, dy), rad);
|
unit.y + Angles.trnsy(rotation, dx, dy), Mathf.atan2(dx, dy));
|
||||||
|
|
||||||
Fill.circle(
|
Draw.rect("vtol-flame",
|
||||||
unit.x + Angles.trnsx(rotation, dx2, dy2),
|
unit.x + Angles.trnsx(rotation, dx2, dy2),
|
||||||
unit.y + Angles.trnsy(rotation, dx2, dy2), rad);
|
unit.y + Angles.trnsy(rotation, dx2, dy2), Mathf.atan2(dx2, dy2));
|
||||||
|
|
||||||
Draw.color(Color.GRAY);
|
Draw.color();
|
||||||
|
|
||||||
Fill.circle(
|
|
||||||
unit.x + Angles.trnsx(rotation, dx, dy)/ds,
|
|
||||||
unit.y + Angles.trnsy(rotation, dx, dy)/ds, 2f);
|
|
||||||
|
|
||||||
Fill.circle(
|
|
||||||
unit.x + Angles.trnsx(rotation, dx2, dy2)/ds,
|
|
||||||
unit.y + Angles.trnsy(rotation, dx2, dy2)/ds, 2f);
|
|
||||||
|
|
||||||
Draw.color(Color.WHITE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,8 +69,8 @@ public class Block extends BaseBlock {
|
|||||||
public int health = 40;
|
public int health = 40;
|
||||||
/**base block explosiveness*/
|
/**base block explosiveness*/
|
||||||
public float baseExplosiveness = 0f;
|
public float baseExplosiveness = 0f;
|
||||||
/**the shadow drawn under the block*/
|
/**the shadow drawn under the block. use 'null' to indicate the default shadow for this block.*/
|
||||||
public String shadow = "shadow";
|
public String shadow = null;
|
||||||
/**whether to display a different shadow per variant*/
|
/**whether to display a different shadow per variant*/
|
||||||
public boolean varyShadow = false;
|
public boolean varyShadow = false;
|
||||||
/**edge fallback, used mainly for ores*/
|
/**edge fallback, used mainly for ores*/
|
||||||
@ -344,10 +344,12 @@ public class Block extends BaseBlock {
|
|||||||
|
|
||||||
public void drawShadow(Tile tile){
|
public void drawShadow(Tile tile){
|
||||||
|
|
||||||
if(varyShadow && variants > 0){
|
if(varyShadow && variants > 0 && shadow != null) {
|
||||||
Draw.rect(shadow + (Mathf.randomSeed(tile.id(), 1, variants)), tile.worldx(), tile.worldy());
|
Draw.rect(shadow + (Mathf.randomSeed(tile.id(), 1, variants)), tile.worldx(), tile.worldy());
|
||||||
|
}else if(shadow != null){
|
||||||
|
Draw.rect(shadow, tile.drawx(), tile.drawy());
|
||||||
}else{
|
}else{
|
||||||
Draw.rect(shadow, tile.worldx(), tile.worldy());
|
Draw.rect("shadow-" + size, tile.drawx(), tile.drawy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,11 @@ public class BlockPart extends Block{
|
|||||||
public void draw(Tile tile){
|
public void draw(Tile tile){
|
||||||
//do nothing
|
//do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawShadow(Tile tile){
|
||||||
|
//also do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSolidFor(Tile tile){
|
public boolean isSolidFor(Tile tile){
|
||||||
|