Fix invisible turret and broken RTG generators
This commit is contained in:
@@ -59,6 +59,7 @@ public class Control extends Module{
|
||||
Tile core;
|
||||
Array<SpawnPoint> spawnpoints = new Array<>();
|
||||
boolean shouldUpdateItems = false;
|
||||
boolean wasPaused = false;
|
||||
|
||||
float respawntime;
|
||||
InputHandler input;
|
||||
@@ -409,6 +410,19 @@ public class Control extends Module{
|
||||
return items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pause(){
|
||||
wasPaused = GameState.is(State.paused);
|
||||
if(GameState.is(State.playing)) GameState.set(State.paused);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resume(){
|
||||
if(GameState.is(State.paused) && !wasPaused){
|
||||
GameState.set(State.playing);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(){
|
||||
Musics.shuffleAll();
|
||||
|
||||
@@ -46,6 +46,7 @@ public class BlastEnemy extends Enemy{
|
||||
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
|
||||
b.damage = BulletType.blast.damage + (tier-1) * 40;
|
||||
damage(999);
|
||||
remove();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ public class HealerEnemy extends Enemy{
|
||||
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
|
||||
b.damage = BulletType.blast.damage + (tier-1) * 30;
|
||||
damage(999);
|
||||
remove();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -157,7 +157,10 @@ public class Turret extends Block{
|
||||
|
||||
float targetRot = Angles.predictAngle(tile.worldx(), tile.worldy(),
|
||||
entity.target.x, entity.target.y, entity.target.xvelocity, entity.target.yvelocity, bullet.speed);
|
||||
|
||||
|
||||
if(Float.isNaN(entity.rotation)){
|
||||
entity.rotation = 0;
|
||||
}
|
||||
entity.rotation = Mathf.slerp(entity.rotation, targetRot,
|
||||
rotatespeed*Timers.delta());
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import io.anuke.ucore.util.Mathf;
|
||||
//TODO
|
||||
public class Teleporter extends Block implements Configurable{
|
||||
public static final int colors = 4;
|
||||
public static final Color[] colorArray = {Color.ROYAL, Color.ORANGE, Color.SCARLET, Color.FOREST};
|
||||
public static final Color[] colorArray = {Color.ROYAL, Color.ORANGE, Color.SCARLET, Color.FOREST, Color.PURPLE, Color.GOLD, Color.PINK};
|
||||
|
||||
private static Array<Tile> removal = new Array<>();
|
||||
private static Array<Tile> returns = new Array<>();
|
||||
|
||||
@@ -73,7 +73,7 @@ public class ItemPowerGenerator extends Generator{
|
||||
PowerEntity entity = tile.entity();
|
||||
|
||||
float maxPower = Math.min(powerCapacity - entity.power, powerOutput * Timers.delta());
|
||||
float mfract = maxPower/(powerOutput * Timers.delta());
|
||||
float mfract = maxPower/(powerOutput);
|
||||
|
||||
if(entity.time > 0f){
|
||||
entity.time -= 1f/itemDuration*mfract;
|
||||
|
||||
Reference in New Issue
Block a user