Пример #1
0
    private void OnChromieCollectedHandler(ChromieController chromieController, ColorZoneController colorZone)
    {
        _gameplayTrackingData.CollectedChromiez++;

        if (_gameplayTrackingData.ColletedColors.ContainsKey(chromieController.ChromieDefenition.ChromieColor))
        {
            _gameplayTrackingData.ColletedColors[chromieController.ChromieDefenition.ChromieColor] += 1;
        }
        else
        {
            _gameplayTrackingData.ColletedColors.Add(chromieController.ChromieDefenition.ChromieColor, 1);
        }

        if (chromieController.IsPowerup)
        {
            _gameplayTrackingData.CollectedPowerups++;

            if (_gameplayTrackingData.CollectedPoweupsColors.ContainsKey(chromieController.ChromieDefenition.ChromieColor))
            {
                _gameplayTrackingData.CollectedPoweupsColors[chromieController.ChromieDefenition.ChromieColor] += 1;
            }
            else
            {
                _gameplayTrackingData.CollectedPoweupsColors.Add(chromieController.ChromieDefenition.ChromieColor, 1);
            }
        }
    }
Пример #2
0
 private void OnChromieHitColorZoneHandler(ChromieController chromieController, ColorZoneController colorZone)
 {
     if (chromieController.ChromieType == colorZone.Color)
     {
         ChromieCollected(chromieController, colorZone);
     }
 }
Пример #3
0
    public void OnChromieCollectedHandler(ChromieController chromieController, ColorZoneController colorZone)
    {
        if (colorZone == this)
        {
            //TODO: Display collection animation
            _colorZoneCharacter.Collected();

        }
    }
Пример #4
0
    private void OnChromieCollectedHandler(ChromieController chromieController, ColorZoneController colorZone)
    {
        if (chromieController.IsPowerup)
        {
            if (chromieController.ChromieDefenition.ActivePowerup != null)
            {
                ActivatePowerup(chromieController.ChromieDefenition.ActivePowerup, chromieController);

            }
        }
    }
Пример #5
0
    public void ActivatePassivePowerupFromColorZone(ColorZoneController colorZneController)
    {
        if (colorZneController.ChromieDefenition.PassivePowerup != null)
        {
            colorZneController.ChromieDefenition.PassivePowerup.StartPowerup(null);

            if (_powerupActivationEffectprefab != null)
            {
                GameObject powerupEffect = Lean.LeanPool.Spawn(_powerupActivationEffectprefab, colorZneController.gameObject.transform.position, Quaternion.identity);
                powerupEffect.GetComponent<ParticleSystem>().startColor = colorZneController.ChromieDefenition.ColorValue;
                Lean.LeanPool.Despawn(powerupEffect, 2.0f);
            }
        }
    }
Пример #6
0
    private void OnChromieCollectedHandler(ChromieController chromieController, ColorZoneController colorZone)
    {
        int scoreToAdd = 1;

        if (_lastCollectedChromie == chromieController.ChromieType)
        {
            _currentComboCount++;
        }
        else
        {
            _currentComboCount = 0;
        }

        scoreToAdd += (_currentComboCount * _currentComboMultiplier);

        scoreToAdd *= _currentScoreMultiplier;

        _currentScore += scoreToAdd;

        GameplayEventsDispatcher.Instance.ScoreUpdate(scoreToAdd, _currentScore, chromieController);

        _lastCollectedChromie = chromieController.ChromieType;
    }
Пример #7
0
 private void ChromieCollected(ChromieController chromieController, ColorZoneController colorZone)
 {
     GameplayEventsDispatcher.SendChromieCollected(chromieController, colorZone);
 }
Пример #8
0
 public void OnChromieCollectedHandler(ChromieController chromieController, ColorZoneController colorZone)
 {
     if (chromieController == this)
     {
         //TODO: do stuff when collected
     }
 }
Пример #9
0
 public static void SendChromieCollected(ChromieController chromieController, ColorZoneController colorZone)
 {
     GameplayEventsDispatcher.Instance.ChromieCollected(chromieController, colorZone);
 }
Пример #10
0
 public void ChromieHitColorZone(ChromieController chromieController, ColorZoneController colorZone)
 {
     if (OnChromieHitColorZone != null)
     {
         OnChromieHitColorZone(chromieController, colorZone);
     }
 }
Пример #11
0
 public void ChromieCollected(ChromieController chromieController, ColorZoneController colorZone)
 {
     if (OnChromieCollected != null)
     {
         OnChromieCollected(chromieController, colorZone);
     }
 }