Update UnitSpawnAbility.java

This commit is contained in:
Patrick 'Quezler' Mounier
2020-11-22 17:33:50 +01:00
committed by GitHub
parent 9dba2389bb
commit 3ef2c585a5

View File

@@ -31,7 +31,7 @@ public class UnitSpawnAbility extends Ability{
@Override @Override
public void update(Unit unit){ public void update(Unit unit){
timer += Time.delta; timer += Time.delta * state.rules.unitBuildSpeedMultiplier;
if(timer >= spawnTime && Units.canCreate(unit.team, type)){ 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); float x = unit.x + Angles.trnsx(unit.rotation, spawnY, spawnX), y = unit.y + Angles.trnsy(unit.rotation, spawnY, spawnX);