/// <summary>
        /// We select a specific BuildingPlatform as the target
        /// </summary>
        /// <param name="target">The buildingPlatform we are going to select</param>
        public void SetTarget(BuildingPlatform target)
        {
            m_Target = target;

            //We use the building position as the position for the UI
            transform.position = target.GetBuildPosition();

            towerName.text = target.GetTower().name;
            sellPrice.text = target.GetTower().SellPrice + "U";
            UI.SetActive(true);
        }
        /// <summary>
        /// Sells the tower on this platform.
        /// </summary>
        public void SellTower(BuildingPlatform platform)
        {
            //we add the credits that we get from the sale and we destroy the tower
            MinigameManager.Instance.AddCurrency(platform.GetTower().SellPrice);
            ParticleSystem particles = Instantiate <ParticleSystem>(SellEffect, platform.GetBuildPosition(), SellEffect.transform.rotation);

            Destroy(particles, 1.5f);

            //Play the audio sound
            audioSource.clip = sellSound;
            audioSource.Play();

            platform.SellTower();
        }
        /// <summary>
        /// Build a tower on the selected platform
        /// </summary>
        /// <param name="platform">Bulding platform where we want to build the tower</param>
        /// <returns></returns>
        public Tower BuildTowerOn(BuildingPlatform platform)
        {
            // If we can affor to build it we do so othwerwise we do nothing
            if (CanAfford())
            {
                MinigameManager.Instance.currency.UpdateCredits(-m_TowerToBuild.Cost);
                Tower          towerToBuild = Instantiate <Tower>(m_TowerToBuild, platform.GetBuildPosition(), platform.transform.rotation);
                ParticleSystem particles    = Instantiate <ParticleSystem>(BuildEffect, platform.GetBuildPosition(), BuildEffect.transform.rotation);
                Destroy(particles.gameObject, 5f);

                //Play the audio sound
                audioSource.clip = buildSound;
                audioSource.Play();

                StopBuilding();
                return(towerToBuild);
            }

            return(null);
        }