e
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
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";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 897a5a659802d994da33b1d1acd76890
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user