mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-03 22:21:17 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b42e5c3b66
@ -12,6 +12,8 @@ import mindustry.graphics.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class UnitSpawnAbility extends Ability{
|
||||
public UnitType type;
|
||||
public float spawnTime = 60f, spawnX, spawnY;
|
||||
@ -31,7 +33,7 @@ public class UnitSpawnAbility extends Ability{
|
||||
|
||||
@Override
|
||||
public void update(Unit unit){
|
||||
timer += Time.delta;
|
||||
timer += Time.delta * state.rules.unitBuildSpeedMultiplier;
|
||||
|
||||
if(timer >= spawnTime && Units.canCreate(unit.team, type)){
|
||||
float x = unit.x + Angles.trnsx(unit.rotation, spawnY, spawnX), y = unit.y + Angles.trnsy(unit.rotation, spawnY, spawnX);
|
||||
|
Loading…
Reference in New Issue
Block a user