Wave balancing / Smoother conveyor items
This commit is contained in:
@@ -195,7 +195,7 @@ public class Zones implements ContentList{
|
|||||||
}},
|
}},
|
||||||
|
|
||||||
new SpawnGroup(UnitTypes.dagger){{
|
new SpawnGroup(UnitTypes.dagger){{
|
||||||
begin = 2;
|
begin = 1;
|
||||||
spacing = 2;
|
spacing = 2;
|
||||||
unitScaling = 2;
|
unitScaling = 2;
|
||||||
}},
|
}},
|
||||||
@@ -271,20 +271,20 @@ public class Zones implements ContentList{
|
|||||||
}},
|
}},
|
||||||
|
|
||||||
new SpawnGroup(UnitTypes.dagger){{
|
new SpawnGroup(UnitTypes.dagger){{
|
||||||
begin = 2;
|
begin = 1;
|
||||||
unitScaling = 1;
|
unitScaling = 1;
|
||||||
spacing = 2;
|
spacing = 2;
|
||||||
}},
|
}},
|
||||||
|
|
||||||
new SpawnGroup(UnitTypes.dagger){{
|
new SpawnGroup(UnitTypes.dagger){{
|
||||||
begin = 10;
|
begin = 11;
|
||||||
spacing = 2;
|
spacing = 2;
|
||||||
unitScaling = 2;
|
unitScaling = 2;
|
||||||
unitAmount = 2;
|
unitAmount = 2;
|
||||||
}},
|
}},
|
||||||
|
|
||||||
new SpawnGroup(UnitTypes.ghoul){{
|
new SpawnGroup(UnitTypes.ghoul){{
|
||||||
begin = 5;
|
begin = 6;
|
||||||
unitScaling = 0.5f;
|
unitScaling = 0.5f;
|
||||||
unitAmount = 1;
|
unitAmount = 1;
|
||||||
spacing = 5;
|
spacing = 5;
|
||||||
|
|||||||
@@ -181,7 +181,9 @@ public class Conveyor extends Block{
|
|||||||
|
|
||||||
ConveyorEntity entity = tile.entity();
|
ConveyorEntity entity = tile.entity();
|
||||||
entity.minitem = 1f;
|
entity.minitem = 1f;
|
||||||
|
Tile next = tile.getNearby(tile.getRotation());
|
||||||
|
|
||||||
|
float nextMax = next.block() instanceof Conveyor ? 1f - Math.max(itemSpace - next.<ConveyorEntity>entity().minitem, 0) : 1f;
|
||||||
int minremove = Integer.MAX_VALUE;
|
int minremove = Integer.MAX_VALUE;
|
||||||
|
|
||||||
for(int i = entity.convey.size - 1; i >= 0; i--){
|
for(int i = entity.convey.size - 1; i >= 0; i--){
|
||||||
@@ -205,10 +207,9 @@ public class Conveyor extends Block{
|
|||||||
pos.x = Mathf.lerpDelta(pos.x, 0, 0.1f);
|
pos.x = Mathf.lerpDelta(pos.x, 0, 0.1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
pos.y = Mathf.clamp(pos.y);
|
pos.y = Mathf.clamp(pos.y, 0, nextMax);
|
||||||
|
|
||||||
if(pos.y >= 0.9999f && offloadDir(tile, pos.item)){
|
if(pos.y >= 0.9999f && offloadDir(tile, pos.item)){
|
||||||
Tile next = tile.getNearby(tile.getRotation());
|
|
||||||
if(next.block() instanceof Conveyor){
|
if(next.block() instanceof Conveyor){
|
||||||
ConveyorEntity othere = next.entity();
|
ConveyorEntity othere = next.entity();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user