using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlanetLighting : MonoBehaviour
{
    [SerializeField] private AstronautController _controller;
    private Light _light;

    void Start()
    {
        _light = GetComponent<Light>();
    }

    void Update()
    {
        switch (_controller.CurrentPlanet)
        {
            case AstronautController.Planet.Mercury:
                _light.color = new Color(1f, 0.9f, 0.7f);
                _light.intensity = 1.8f;
                break;
            case AstronautController.Planet.Venus:
                _light.color = new Color(1f, 0.7f, 0.3f);
                _light.intensity = 1.4f;
                break;
            case AstronautController.Planet.Earth:
                _light.color = new Color(1f, 0.98f, 0.9f);
                _light.intensity = 1f;
                break;
            case AstronautController.Planet.Moon:
                _light.color = new Color(0.7f, 0.75f, 0.9f);
                _light.intensity = 0.6f;
                break;
            case AstronautController.Planet.Mars:
                _light.color = new Color(1f, 0.5f, 0.2f);
                _light.intensity = 0.8f;
                break;
            case AstronautController.Planet.Jupiter:
                _light.color = new Color(1f, 0.85f, 0.6f);
                _light.intensity = 0.4f;
                break;
            case AstronautController.Planet.Saturn:
                _light.color = new Color(0.9f, 0.8f, 0.5f);
                _light.intensity = 0.35f;
                break;
            case AstronautController.Planet.Uranus:
                _light.color = new Color(0.4f, 0.8f, 1f);
                _light.intensity = 0.2f;
                break;
            case AstronautController.Planet.Neptune:
                _light.color = new Color(0.2f, 0.4f, 1f);
                _light.intensity = 0.15f;
                break;
            case AstronautController.Planet.Sun:
                _light.color = new Color(1f, 1f, 0.8f);
                _light.intensity = 5f;
                break;
        }
    }
}
