2025-11-20 02:23:07 +08:00
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class Character : MonoBehaviour
|
|
|
|
|
{
|
2025-11-20 14:43:50 +08:00
|
|
|
[SerializeField] private int ID;
|
|
|
|
|
[SerializeField] private List<Card> ownedCardList;
|
2025-11-20 02:23:07 +08:00
|
|
|
|
2025-11-20 17:06:04 +08:00
|
|
|
private DATACLASS_CHARACTER_RENDER_DATA renderData;
|
|
|
|
|
public void SetID(int id) => ID = id;
|
2025-11-20 14:43:50 +08:00
|
|
|
|
2025-11-20 02:23:07 +08:00
|
|
|
|
2025-11-20 17:06:04 +08:00
|
|
|
public void RecordRenderData(DATACLASS_CHARACTER_RENDER_DATA render_data) => renderData = render_data;
|
|
|
|
|
|
|
|
|
|
public List<Card> SetCardID()
|
2025-11-20 02:23:07 +08:00
|
|
|
{
|
2025-11-20 14:43:50 +08:00
|
|
|
for (int i = 0; i < ownedCardList.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
ownedCardList[i].SetID(int.Parse($"{ID}{i}"));
|
|
|
|
|
}
|
2025-11-20 17:06:04 +08:00
|
|
|
|
|
|
|
|
return ownedCardList;
|
2025-11-20 02:23:07 +08:00
|
|
|
}
|
|
|
|
|
}
|