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;
|
||||
}},
|
||||
|
||||
powernode = new PowerDistributor("powernode"),
|
||||
powernode = new PowerDistributor("powernode"){{
|
||||
shadow = "powernode-shadow";
|
||||
}},
|
||||
|
||||
powernodelarge = new PowerDistributor("powernodelarge"){{
|
||||
size = 2;
|
||||
powerSpeed = 1f;
|
||||
maxNodes = 5;
|
||||
laserRange = 7.5f;
|
||||
shadow = "powernodelarge-shadow";
|
||||
}},
|
||||
|
||||
teleporter = new Teleporter("teleporter");
|
||||
|
@ -1,6 +1,5 @@
|
||||
package io.anuke.mindustry.entities.units.types;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import io.anuke.mindustry.content.AmmoTypes;
|
||||
import io.anuke.mindustry.entities.Unit;
|
||||
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.ucore.core.Timers;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Fill;
|
||||
import io.anuke.ucore.util.Angles;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
@ -26,33 +24,21 @@ public class Vtol extends FlyingUnitType {
|
||||
for(int i : Mathf.signs) {
|
||||
|
||||
float rotation = unit.rotation - 90;
|
||||
float dx = 5f * i, dx2 = 6f * i;
|
||||
float dy = 4f, dy2 = -5f;
|
||||
float scl = 0.7f + Mathf.absin(Timers.time(), 3f, 0.2f);
|
||||
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);
|
||||
float ds = 1.2f;
|
||||
Draw.color(Palette.lighterOrange, Palette.lightFlame, Mathf.absin(Timers.time(), 3f, 0.7f));
|
||||
|
||||
Draw.color(Palette.lightishOrange, Palette.lightFlame, Mathf.absin(Timers.time(), 3f, 0.3f));
|
||||
|
||||
Fill.circle(
|
||||
Draw.rect("vtol-flame",
|
||||
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.y + Angles.trnsy(rotation, dx2, dy2), rad);
|
||||
unit.y + Angles.trnsy(rotation, dx2, dy2), Mathf.atan2(dx2, dy2));
|
||||
|
||||
Draw.color(Color.GRAY);
|
||||
|
||||
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);
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
|
||||
|
@ -69,8 +69,8 @@ public class Block extends BaseBlock {
|
||||
public int health = 40;
|
||||
/**base block explosiveness*/
|
||||
public float baseExplosiveness = 0f;
|
||||
/**the shadow drawn under the block*/
|
||||
public String shadow = "shadow";
|
||||
/**the shadow drawn under the block. use 'null' to indicate the default shadow for this block.*/
|
||||
public String shadow = null;
|
||||
/**whether to display a different shadow per variant*/
|
||||
public boolean varyShadow = false;
|
||||
/**edge fallback, used mainly for ores*/
|
||||
@ -344,10 +344,12 @@ public class Block extends BaseBlock {
|
||||
|
||||
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());
|
||||
}else if(shadow != null){
|
||||
Draw.rect(shadow, tile.drawx(), tile.drawy());
|
||||
}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){
|
||||
//do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawShadow(Tile tile){
|
||||
//also do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSolidFor(Tile tile){
|
||||
|