This commit is contained in:
JA
2026-06-20 19:34:23 +08:00
parent e5031c0068
commit d442805c3f
4136 changed files with 514641 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class SaveItem : MonoBehaviour, IPointerClickHandler
{
public Text _PlayerName;
public Text _PlayerLevel;
public string DateFileName;
public Text DateName;
private CharInfo info;
public UISaveDate root;
public void OnPointerClick(PointerEventData eventData)
{
root.Select(info, DateName.text, DateFileName);
}
private void Start()
{
Init();
}
public void Init()
{
//初始化存档数据
var date = SaveSystem.LoadDate<CharInfo>(DateFileName);
if (date != null)
{
//数据加载
info = date;
_PlayerName.text = info.playerName;
_PlayerLevel.text = "LV " + info.Level.ToString();
}
else
{
_PlayerName.text = "空白存档";
_PlayerLevel.text = "LV 1";
}
}
}