Exemple #1
0
 protected override void Update()
 {
     if (_isDirty && isActiveAndEnabled)
     {
         _isDirty = false;
         _ballSpriteRenderer.sprite = BallType.GetSprite();
         Hitpoints    = Magnitude.GetHitpoints();
         MaxHitpoints = Magnitude.GetHitpoints(); PowerGemSprite.SetActive(HasPowerGem);
         DamageSprite.SetActive(Magnitude != BallMagnitude.Standard);
         gameObject.transform.localScale = _baseScale * Magnitude.GetScale();
     }
 }
Exemple #2
0
        private void GenerateNextBall()
        {
            BallCounterText.text = _ballSequence.Count.ToString();
            if (_ballSequence.Any())
            {
                _nextProjectileType = _ballSequence.Dequeue();
                var ballSprite = _nextProjectileType.GetSprite();

                NextProjectile.GetComponent <NextBallController>().SetNextBall(ballSprite);
            }
            else
            {
                GameManager.Instance.EventBus.Broadcast(new GameOverEventArgs(GameOverCondition.LossByEmptyLauncher));
            }
        }