Пример #1
0
    private void UpdateEnergies()
    {
        if (!Connected)
        {
            Reset();
        }
        else
        {
            EnergyTypes type = currentEnergies[0].EnergyType.Type;
            config = Configs.main.EnergyTypeConfigs[type];

            if (currentEnergies.Count > 1)
            {
                config = config.GetCombo(currentEnergies[1].EnergyType.Type);
            }

            distanceIndicator.Show(transform.position);
            towerMesh.Activate();

            Material[] materials = towerTopRenderer.materials;
            materials[1] = config.CrystalMaterial;
            towerTopRenderer.sharedMaterials = materials;
            towerTopRenderer.materials       = materials;

            materials    = towerBottomRenderer.materials;
            materials[1] = config.CrystalMaterial;
            towerBottomRenderer.sharedMaterials = materials;
            towerBottomRenderer.materials       = materials;

            var main = topEffect.main;
            main.startColor = config.EffectColor;

            bottomEffect.trailMaterial = config.CrystalMaterial;

            topLight.color = config.EffectColor;

            topEffect.Play();
            topLight.enabled = true;

            Color color = config.EffectColor;
            color.a = 0.05f;
            distanceIndicator.SetColor(color);
        }
    }
Пример #2
0
 public void ShowAt(Vector3 position)
 {
     hoverIndicator.Show(position);
 }