Exemplo n.º 1
0
        private void clearOldTiles()
        {
            var oldFits = targetArea.Fits(targetGridPosition, SizeOffset) == TowerFitStatus.Fits;

            if (oldFits)
            {
                targetArea.Clear(targetGridPosition, SizeOffset);
            }
        }
Exemplo n.º 2
0
        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);
        }