48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Logic.Multilingual;
|
|
using RuntimeData;
|
|
using TH1_Logic.Core;
|
|
using TH1_Logic.Net;
|
|
using TH1_Logic.Steam;
|
|
using TH1_UI.HintUI;
|
|
using TH1_UI.View.Outside;
|
|
using TMPro;
|
|
using UI.HintUI;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UIOutsideSelectSkillCircleMono : MonoBehaviour
|
|
{
|
|
|
|
|
|
public Image Img;
|
|
public HintTrigger HintTrigger;
|
|
public Image BGImg;
|
|
public Sprite NormalBG;
|
|
public Sprite GroundBG;
|
|
|
|
public void SetContent(Empire playerEmpire,TechAtom techAtom)
|
|
{
|
|
if (Img == null) return;
|
|
if(!Table.Instance.TechDataAssets.GetTechAtomInfo(techAtom,out var info))return;
|
|
Img.sprite = info.GetIcon(playerEmpire.Civ,playerEmpire.Force,GridSpType.None);
|
|
IconSizingUtility.SetIconSize(Img,info.iconViewSizeType,true);
|
|
BGImg.sprite = (info.iconViewSizeType is IconViewSizeType.Resource or IconViewSizeType.Building or IconViewSizeType.Unit or IconViewSizeType.MountainBuilding) ?GroundBG:NormalBG;
|
|
|
|
HintTrigger.DataProvider.HintDataType = HintDataType.TechAtomHintData;
|
|
HintTrigger.DataProvider.TechAtom = techAtom;
|
|
}
|
|
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|