public void SpawnAchievement(ref Types.SAchievementInfo info) { GameObject go = Instantiate(m_goAchievementPrefab, transform, false); UI_AchievementIconSetup gc = go.GetComponent <UI_AchievementIconSetup>(); GAssert.Assert(null != gc, "Unable to setup Achievement Icon Info!"); gc.SetInfo(ref info); LerpToPositionOverDuration gc2 = go.GetComponent <LerpToPositionOverDuration>(); GAssert.Assert(null != gc2, "Unable to get the lerp component on the achievement icon!"); gc2.SetupParams(go.transform.position, go.transform.position + new Vector3(0f, 39f, 0f), 1.8f); }
public void SetInfo(ref Types.SAchievementInfo info) { m_gcText.text = info._sAchievementTitle; m_gcIcon.sprite = info._Assets._gcSprite; }