Esempio n. 1
0
 public void ApplyColor(string color)
 {
     _isInvincible = true;
     _color        = color;
     _colorChanger.ChangeColor(GameConfiguration.GetMaterial(color), GameConfiguration.Instance.ColorChangeTime);
     this.WaitForSeconds(GameConfiguration.Instance.BallSettings.InvincibilityTime, () => _isInvincible = false);
 }
Esempio n. 2
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);
        }
Esempio n. 3
0
 public void ApplyColor(string color)
 {
     Color = color;
     _colorChanger.ChangeColor(GameConfiguration.GetMaterial(color), GameConfiguration.Instance.ColorChangeTime);
 }
Esempio n. 4
0
 public override void Activate()
 {
     _renderer.enabled        = true;
     _color                   = GameConfiguration.GetRandomColorName();
     _renderer.sharedMaterial = GameConfiguration.GetMaterial(_color);
 }