using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class AchievementNotif : MonoBehaviour {
public AchievementContentNotif _achievementContentNotif;
public Animator _animNotif;
#region Event
void OnEnable(){
EventAchievementManager.onAchievementE += ShowNotif;
}
void OnDisable(){
EventAchievementManager.onAchievementE -= ShowNotif;
}
#endregion
void ShowNotif (int i) {
List<AchievementContents> _myCollection = AchievementSource._instance._myCollection;
_achievementContentNotif.SetContent(_myCollection[i]._name,
_myCollection[i]._type,
_myCollection[i]._goal);
_animNotif.Play("PopNotif" , -1 , 0f);
}
}
qiita.com