コード例 #1
0
        public void Init(BuildingBase building)
        {
            building.OnDemolishStart();
            CityCamera.Instance.audioSource.PlayOneShot(demolishSFX);
            particleSystem.Play();
            float destroyTime = ((shrinkTime > particleSystem.main.duration) ? shrinkTime : particleSystem.main.duration) + 1f;

            Destroy(gameObject, destroyTime);
            StartCoroutine(Shrink(building.transform));
            CityCamera.Instance.audioSource.PlayOneShot(demolishSFX);
            building.GetComponent <Collider>().enabled = false;
        }