using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor.SearchService;
using UnityEngine;
using UnityEngine.UI;
public class EntryUI : MonoBehaviour
{
    public FleetManager fleetManager;
    public Text fleetNameText;
    public Text fleetStrengthText;
    public Text NumberText;
    public Text Location;
    public Text IDText;
    public Camera Camera;
  
    public void SetEntryInfo(Fleet fleet, FleetManager fleetManager)
    {
        this.fleetManager = fleetManager;
        fleetNameText.text = fleet.Name;
        fleetStrengthText.text = fleet.GetStrength().ToString();
        NumberText.text = fleet.GetNumberOfShips().ToString();
        this.Camera = Camera.main;
    }
    public void MoveCameraToFleet()
    {

        Vector3 v= new Vector3();
       v.x = fleetManager.Fleets[Int32.Parse(IDText.text)].transform.position.x;
        v.y = fleetManager.Fleets[Int32.Parse(IDText.text)].transform.position.y;
        v.z = Camera.transform.position.z;
        Camera.transform.localPosition = v; 
    }
    public void SelectFleet()
    {
        this.fleetManager.selectedFleet = this.fleetManager.Fleets[Int32.Parse(IDText.text)];
    }
}
