public void ChangeRow(Constants.RowID newrow) { Constants.RowID previousrow = currentRow; currentRow = newrow; positionInRow += Random.Range(-0.01f, 0.01f); BattleManager.DistributePositions(newrow); BattleManager.DistributePositions(previousrow); }
// Helper functions public static void DistributePositions(Constants.RowID row) { //detects all units in a row and evens out the positions }