mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-03-04 22:50:36 +07:00
Moved default angle to its own field
This commit is contained in:
parent
41ff1997a4
commit
851cdc2aa5
@ -6,12 +6,13 @@ import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Pool;
|
||||
|
||||
public class AngleComponent implements Component, Pool.Poolable {
|
||||
public final Vector2 angle = Vector2.X.cpy().rotateRad(MathUtils.PI / 2);
|
||||
private static final float DEFAULT_ANGLE = MathUtils.PI / 2;
|
||||
public final Vector2 angle = Vector2.X.cpy().rotateRad(DEFAULT_ANGLE);
|
||||
public final Vector2 target = angle.cpy();
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
angle.rotateRad(MathUtils.PI / 2);
|
||||
angle.rotateRad(DEFAULT_ANGLE);
|
||||
target.set(angle);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user