public override void Trigger() { _renderer.enabled = false; _splashMaterial.color = GameConfiguration.GetColor(_color); _particleSystem.Play(); SignalsManager.Broadcast(_audioSignal.Name, _sound); GameController.Instance.GameSession.ApplyColor(_color); Debug.Log("Trigger Color"); }
public void ActivatePlaceholder(bool isActive, int color = 0) { if (color > 0) { _placeHolder.color = GameConfiguration.GetColor(color).WithAlpha(_placeHolder.color.a); } _placeHolder.gameObject.SetActive(isActive); }
private void ApplyColor(string color) { var newColor = GameConfiguration.GetColor(color); for (var i = 0; i < _activeLives.Count; i++) { var image = _activeLives[i].GetComponent <Image>(); if (image != null) { image.color = newColor; } } }
private void UpdateColor(string color) { var platform = GetComponentInParent <Platform>(); if (platform != null) { var material = GameConfiguration.GetMaterial(platform.Color); var materials = new Material[_renderer.materials.Length]; for (var i = 0; i < materials.Length; i++) { materials[i] = material; } _renderer.materials = materials; } _splashMaterial.color = GameConfiguration.GetColor(color); }
public void Setup(int value) { _value = value; _valueText.text = FormatHelper.FormatValue(value, true); if (value < 1000) { _kSprite.enabled = false; _colorChanger.SetRenderer(_backSprite); } else { _kSprite.enabled = true; _backSprite.color = Color.white; _colorChanger.SetRenderer(_kSprite); } _colorChanger.ChangeColor(GameConfiguration.GetColor(value)); _animator.SetTrigger(_appearHash); EnablePhysics(false); }
public void Play(int color) { _isActive = true; _material.color = GameConfiguration.GetColor(color); _particleSystem.Play(); }
public void ApplyColor(string color) { _renderer.color = GameConfiguration.GetColor(color); _splashMaterial.color = GameConfiguration.GetColor(color); }