using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;

public class City : MonoBehaviour
{
    public string cityName;
    public TMP_Text nameDisplay;

    // Update is called once per frame
    void Update()
    {
        
    }

    public void SetName(string newName)
  {
        gameObject.name = "City: " + newName;
        cityName = newName;
        nameDisplay.text = cityName;
    }

    public float DistanceTo(City otherCity)
    {
        return Vector3.Distance(transform.position, otherCity.transform.position);
    }

    void OnMouseDown()
    {
        InformationPanelManager.ActivateCity(this);
    }

    public float FuelRate()
    {
        return 1.45f;
    }
}
