67 lines
1.7 KiB
C#
67 lines
1.7 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using Animancer;
|
||
using Logic;
|
||
using Logic.Action;
|
||
using Logic.AI;
|
||
using Logic.Audio;
|
||
using Logic.Config;
|
||
using Logic.Multilingual;
|
||
using ParadoxNotion;
|
||
using RuntimeData;
|
||
using Steamworks;
|
||
using TH1_Core.Events;
|
||
using TH1_Core.Managers;
|
||
using TH1_Logic.Action;
|
||
using TH1_Logic.Config;
|
||
using TH1_Logic.Core;
|
||
using TH1_Logic.Net;
|
||
using TH1_Logic.Steam;
|
||
using TH1_UI.View.Announce;
|
||
using TH1Resource;
|
||
using TMPro;
|
||
using Unity.VisualScripting;
|
||
using UnityEngine;
|
||
using UnityEngine.UI;
|
||
using ConfigManager = TH1_Logic.Config.ConfigManager;
|
||
|
||
namespace TH1_UI.View.Outside
|
||
{
|
||
|
||
|
||
public class UIOutsideHistoryItemMono : MonoBehaviour
|
||
{
|
||
public Image Avatar;
|
||
public TextMeshProUGUI EmpireName;
|
||
public TextMeshProUGUI Difficulty;
|
||
public TextMeshProUGUI Time;
|
||
public TextMeshProUGUI Turn;
|
||
public TextMeshProUGUI Score;
|
||
public TextMeshProUGUI PlayerCount;
|
||
public TextMeshProUGUI Coe;
|
||
|
||
|
||
|
||
//关闭时执行的委托
|
||
public ViDelegateAssisstant.Dele OnBtnCloseClick;
|
||
|
||
//开始游戏时执行的委托(目前委托内容就是执行controller的Close())
|
||
public ViDelegateAssisstant.Dele OnStartGame;
|
||
|
||
|
||
public void SetContent(GameRecord record)
|
||
{
|
||
Turn.text = record.Turn.ToString();
|
||
Score.text = record.Score.ToString();
|
||
Table.Instance.PlayerDataAssets.GetPlayerInfoByCivId(record.PlayerCivId, record.PlayerForceId, out var info);
|
||
Avatar.sprite = info.LeaderIllustration;
|
||
EmpireName.text = MultilingualManager.Instance.GetMultilingualTextSafe(info.ForceName);
|
||
PlayerCount.text = record.PlayerCount.ToString();
|
||
Coe.text = "×1.0";
|
||
Difficulty.text = record.AIDiff.ToString();
|
||
if(DateTime.TryParse(record.Time,out var dateTime))
|
||
Time.text = dateTime.ToString("yyyy.MM.dd HH:mm");
|
||
}
|
||
}
|
||
}
|