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); } } }
private void OnChromieHitColorZoneHandler(ChromieController chromieController, ColorZoneController colorZone) { if (chromieController.ChromieType == colorZone.Color) { ChromieCollected(chromieController, colorZone); } }
public void OnChromieCollectedHandler(ChromieController chromieController, ColorZoneController colorZone) { if (colorZone == this) { //TODO: Display collection animation _colorZoneCharacter.Collected(); } }
private void OnChromieCollectedHandler(ChromieController chromieController, ColorZoneController colorZone) { if (chromieController.IsPowerup) { if (chromieController.ChromieDefenition.ActivePowerup != null) { ActivatePowerup(chromieController.ChromieDefenition.ActivePowerup, chromieController); } } }
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); } } }
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; }
private void ChromieCollected(ChromieController chromieController, ColorZoneController colorZone) { GameplayEventsDispatcher.SendChromieCollected(chromieController, colorZone); }
public void OnChromieCollectedHandler(ChromieController chromieController, ColorZoneController colorZone) { if (chromieController == this) { //TODO: do stuff when collected } }
public static void SendChromieCollected(ChromieController chromieController, ColorZoneController colorZone) { GameplayEventsDispatcher.Instance.ChromieCollected(chromieController, colorZone); }
public void ChromieHitColorZone(ChromieController chromieController, ColorZoneController colorZone) { if (OnChromieHitColorZone != null) { OnChromieHitColorZone(chromieController, colorZone); } }
public void ChromieCollected(ChromieController chromieController, ColorZoneController colorZone) { if (OnChromieCollected != null) { OnChromieCollected(chromieController, colorZone); } }