Sprite cleanup / Stats / More balancing / New events
This commit is contained in:
@@ -2,6 +2,7 @@ package io.anuke.mindustry.entities;
|
||||
|
||||
import io.anuke.annotations.Annotations.Loc;
|
||||
import io.anuke.annotations.Annotations.Remote;
|
||||
import io.anuke.arc.Events;
|
||||
import io.anuke.arc.collection.Array;
|
||||
import io.anuke.arc.collection.ObjectSet;
|
||||
import io.anuke.arc.entities.Effects;
|
||||
@@ -16,6 +17,7 @@ import io.anuke.arc.util.Time;
|
||||
import io.anuke.mindustry.content.Fx;
|
||||
import io.anuke.mindustry.entities.bullet.Bullet;
|
||||
import io.anuke.mindustry.entities.traits.TargetTrait;
|
||||
import io.anuke.mindustry.game.EventType.BlockDestroyEvent;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.gen.Call;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
@@ -244,6 +246,7 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
|
||||
dead = true;
|
||||
Block block = tile.block();
|
||||
|
||||
Events.fire(new BlockDestroyEvent(tile));
|
||||
block.onDestroyed(tile);
|
||||
world.removeBlock(tile);
|
||||
block.afterDestroyed(tile, this);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.anuke.mindustry.entities;
|
||||
|
||||
import io.anuke.arc.Core;
|
||||
import io.anuke.arc.Events;
|
||||
import io.anuke.arc.entities.Effects;
|
||||
import io.anuke.arc.entities.impl.DestructibleEntity;
|
||||
import io.anuke.arc.entities.trait.DamageTrait;
|
||||
@@ -17,6 +18,7 @@ import io.anuke.arc.math.geom.Vector2;
|
||||
import io.anuke.arc.util.Time;
|
||||
import io.anuke.mindustry.content.Blocks;
|
||||
import io.anuke.mindustry.entities.traits.*;
|
||||
import io.anuke.mindustry.game.EventType.UnitDestroyEvent;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.game.Teams.TeamData;
|
||||
import io.anuke.mindustry.net.Interpolator;
|
||||
@@ -121,6 +123,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
||||
inventory.clear();
|
||||
drownTime = 0f;
|
||||
status.clear();
|
||||
Events.fire(new UnitDestroyEvent(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,12 +31,16 @@ public class ScorchDecal extends Decal{
|
||||
|
||||
@Override
|
||||
public void drawDecal(){
|
||||
|
||||
for(int i = 0; i < 5; i++){
|
||||
TextureRegion region = regions[Mathf.randomSeed(id - i, 0, scorches - 1)];
|
||||
float rotation = Mathf.randomSeed(id + i, 0, 360);
|
||||
float space = 1.5f + Mathf.randomSeed(id + i + 1, 0, 20) / 10f;
|
||||
Draw.rect(region, x + Angles.trnsx(rotation, space), y + Angles.trnsy(rotation, space) + region.getHeight()/2f, region.getWidth()/2f, 0, rotation - 90);
|
||||
Draw.rect(region,
|
||||
x + Angles.trnsx(rotation, space),
|
||||
y + Angles.trnsy(rotation, space) + region.getHeight()/2f*Draw.scl,
|
||||
region.getWidth() * Draw.scl,
|
||||
region.getHeight() * Draw.scl,
|
||||
region.getWidth()/2f*Draw.scl, 0, rotation - 90);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user