示例#1
0
        public void ApplyDamage(int damageValue)
        {
            hitPoint -= damageValue;

            hpBar.OnHPValueChange(hitPoint);

            if (hitPoint > 0)
            {
                return;
            }

            StageManager.Instance.RemoveAtBuilding(this);

            GameEffectManager.Scripts.
            GameEffectManager.Instance.OnGenelateEffect
                (transform.position,
                EffectType.BuildingExplosion);

            Destroy(gameObject);
        }