Beispiel #1
0
        private void OnDestroyInvader(InvaderView inTarget)
        {
            var hitScore = inTarget.Kill();

            AudioSystem.Play(AudioLabel.HitInvaders);
            hitScore += DestroyMatches(inTarget);
            OnCollectScore?.Invoke(hitScore);
        }
        public void Shoot(Vector3 inPosition, Vector3 inDirection, LayerMask inLayerMask, string by)
        {
            var bullet = ObjectPool.GetObject <BulletView>();

            if (bullet == null)
            {
                GameExceptions.Exception($"Pool is Empty! increase the size of the buffer.");
            }

            AudioSystem.Play(AudioLabel.Shoot);
            bullet.Launch(inPosition, inDirection, inLayerMask, by);
            bullet.onDspawn += OnDespawnBullet;
            _bulletsInScene.Add(bullet);
        }
Beispiel #3
0
 public void MoveLine(Direction inDirection, float inStepLength, float inStepDuration, Action onComplete)
 {
     AudioSystem.Play(AudioLabel.InvadersMove);
     _matrix.MoveLineTo(_config.animation.basedLine, inDirection, inStepLength, inStepDuration, onComplete);
 }