_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/lianghaoLL/AnnouncementTongzhi.cs

29 lines
669 B
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
2024-12-01 11:42:23 +08:00
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using Debug = UnityEngine.Debug;
public class AnnouncementTongzhi : MonoBehaviour
{
private Announcement announcement;
public RichText richText;
2024-12-01 11:42:23 +08:00
public TextMeshProUGUI textMeshPro;
public Announcement Announcement
{
[DebuggerStepThrough]
get => announcement;
[DebuggerStepThrough]
set
{
announcement = value;
Debug.Log(value.ToString());
richText.Text = value.content;
2024-12-01 11:42:23 +08:00
textMeshPro.text = value.title;
}
}
}