Added coal purifier block
This commit is contained in:
@@ -108,7 +108,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
||||
Draw.reset();
|
||||
}
|
||||
},
|
||||
plasmaflame = new BulletType(0.8f, 15){
|
||||
plasmaflame = new BulletType(0.8f, 17){
|
||||
{
|
||||
lifetime = 65f;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class Player extends DestructibleEntity{
|
||||
float speed = this.speed;
|
||||
|
||||
if(Vars.debug)
|
||||
speed = 2f;
|
||||
speed *= 3f;
|
||||
|
||||
if(health < maxhealth && Timers.get(this, 50))
|
||||
health ++;
|
||||
@@ -76,10 +76,10 @@ public class Player extends DestructibleEntity{
|
||||
|
||||
vector.limit(speed);
|
||||
|
||||
move(vector.x*delta, vector.y*delta, 4);
|
||||
move(vector.x*Timers.delta(), vector.y*Timers.delta(), 4);
|
||||
|
||||
if(!shooting){
|
||||
direction.add(vector.scl(delta));
|
||||
direction.add(vector.scl(Timers.delta()));
|
||||
direction.limit(speed*6);
|
||||
}else{
|
||||
float angle = Angles.mouseAngle(x, y);
|
||||
|
||||
@@ -13,6 +13,7 @@ import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.Blocks;
|
||||
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
||||
import io.anuke.ucore.core.Effects;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.entities.Entity;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
@@ -67,7 +68,7 @@ public class TileEntity extends Entity{
|
||||
@Override
|
||||
public void update(){
|
||||
if(health != 0 && !tile.block().name().contains("block") &&
|
||||
Mathf.chance(0.009f*delta*(1f-(float)health/maxhealth))){
|
||||
Mathf.chance(0.009f*Timers.delta()*(1f-(float)health/maxhealth))){
|
||||
|
||||
Effects.effect("smoke", x+Mathf.range(4), y+Mathf.range(4));
|
||||
}
|
||||
@@ -87,6 +88,10 @@ public class TileEntity extends Entity{
|
||||
return items.get(item, 0) > 0;
|
||||
}
|
||||
|
||||
public boolean hasItem(Item item, int amount){
|
||||
return items.get(item, 0) >= amount;
|
||||
}
|
||||
|
||||
public void addItem(Item item, int amount){
|
||||
items.put(item, items.get(item, 0) + amount);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class Enemy extends DestructibleEntity{
|
||||
Vector2 vec = Pathfind.find(this);
|
||||
vec.sub(x, y).setLength(speed);
|
||||
|
||||
move(vec.x*delta, vec.y*delta, Vars.tilesize-4);
|
||||
move(vec.x*Timers.delta(), vec.y*Timers.delta(), Vars.tilesize-4);
|
||||
|
||||
if(Timers.get(this, 15)){
|
||||
target = World.findTileTarget(x, y, null, range, false);
|
||||
|
||||
Reference in New Issue
Block a user