Esempio n. 1
0
        public void Setup()
        {
            _currentBubbleAmmo = Instantiate(_bubbleAmmoPrefab, CurrentAmmoPosition(), Quaternion.identity);
            _currentBubbleAmmo.SetBubbleConfig(GetRandomAmmoBubbleConfig());

            _nextBubbleAmmo = Instantiate(_bubbleAmmoPrefab, NextAmmoPosition(), Quaternion.identity);
            _nextBubbleAmmo.transform.localScale = Vector3.one * _nextAmmoScale;
            _nextBubbleAmmo.SetBubbleConfig(GetRandomAmmoBubbleConfig());
        }
Esempio n. 2
0
        public BubbleAmmoView TakeCurrentAmmo()
        {
            var ammoToShoot = _currentBubbleAmmo;

            _currentBubbleAmmo = _nextBubbleAmmo;
            _currentBubbleAmmo.transform.position   = transform.position;
            _currentBubbleAmmo.transform.localScale = Vector3.one;

            _nextBubbleAmmo = Instantiate(_bubbleAmmoPrefab, NextAmmoPosition(), Quaternion.identity);
            _nextBubbleAmmo.transform.localScale = Vector3.one * _nextAmmoScale;
            _nextBubbleAmmo.SetBubbleConfig(GetRandomAmmoBubbleConfig());

            return(ammoToShoot);
        }