This commit is contained in:
Anuken
2025-02-08 10:48:44 -05:00
parent 2868dbadd1
commit f8b6600fe7

View File

@@ -46,7 +46,7 @@ public class UnitSpawnAbility extends Ability{
timer += Time.delta * state.rules.unitBuildSpeed(unit.team);
if(timer >= spawnTime && Units.canCreate(unit.team, this.unit)){
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);
spawnEffect.at(x, y, 0f, parentizeEffects ? unit : null);
Unit u = this.unit.create(unit.team);
u.set(x, y);
@@ -64,7 +64,7 @@ public class UnitSpawnAbility extends Ability{
public void draw(Unit unit){
if(Units.canCreate(unit.team, this.unit)){
Draw.draw(Draw.z(), () -> {
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);
Drawf.construct(x, y, this.unit.fullIcon, unit.rotation - 90, timer / spawnTime, 1f, timer);
});
}