private void clearOldTiles() { var oldFits = targetArea.Fits(targetGridPosition, SizeOffset) == TowerFitStatus.Fits; if (oldFits) { targetArea.Clear(targetGridPosition, SizeOffset); } }
private void sell() { PlayerStats.I.Worth += Mathf.CeilToInt(courseOfAction.GetValue() * Constants.SELL_PERCENTAGE); placementArea.Clear(areaGridPosition, areaSizeOffset); HelperObjects.SelectedInfoBar.Deselect(); // Spawn effect GameObject effect = UnityHelper.Instantiate(BuildManager.I.SellEffect, transform.position); Destroy(effect, 5f); Destroy(gameObject); }