using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class Character : MonoBehaviour { [SerializeField] private int ID; [SerializeField] private List ownedCardList; private void Awake() { TurnManagerEvent.OnSetCardID += SetCardID; } private void OnDestroy() { TurnManagerEvent.OnSetCardID -= SetCardID; } private void SetCardID() { for (int i = 0; i < ownedCardList.Count; i++) { ownedCardList[i].SetID(int.Parse($"{ID}{i}")); } } }