예제 #1
0
 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");
 }
예제 #2
0
파일: Cell.cs 프로젝트: disas69/Bubble-Pops
        public void ActivatePlaceholder(bool isActive, int color = 0)
        {
            if (color > 0)
            {
                _placeHolder.color = GameConfiguration.GetColor(color).WithAlpha(_placeHolder.color.a);
            }

            _placeHolder.gameObject.SetActive(isActive);
        }
예제 #3
0
        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;
                }
            }
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
 public void Play(int color)
 {
     _isActive       = true;
     _material.color = GameConfiguration.GetColor(color);
     _particleSystem.Play();
 }
예제 #7
0
 public void ApplyColor(string color)
 {
     _renderer.color       = GameConfiguration.GetColor(color);
     _splashMaterial.color = GameConfiguration.GetColor(color);
 }