Пример #1
0
        private void Start()
        {
            ParticleSystem exp = GetComponent <ParticleSystem>();

            exp.Play();

            SetSound.PlaySound("Explosion");
            Destroy(gameObject, exp.main.duration);
        }
        public void Drop(float fuze, int radius, Vector2Int position)
        {
            if (!IsReady)
            {
                throw new InvalidOperationException("Cannot drop a bomb already dropped");
            }

            RemainingFuze = fuze;
            Radius        = radius;
            _position     = position;

            gameObject.SetActive(true);
            transform.position = new Vector3(position.x, 0, position.y);
            SetSound.PlaySound("BombCharge");
        }