void ShowAchievementPortraits(PortraitPartType portraitPartType) { List <int> portraits = UserM.GetAchievementPortraits(portraitPartType); for (int i = 0; i < portraits.Count; i++) { GameObject go = NDLoad.LoadWndItem("HeadItem", mAttachRoot[(int)PortratiType.Achivement].transform); HeadItem headItem = go.GetComponent <HeadItem>(); headItem.Init(this); headItem.ShowPortrait(portraitPartType, portraits[i]); mHeadItem.Add(headItem); } mAttachRoot[(int)PortratiType.Achivement].Reposition(); }
public void CreateEnemySoldier(int soldierID) { GameObject go = NDLoad.LoadWndItem("HeadItem", MyHead.transform); HeadItem headItem = go.GetComponent <HeadItem>(); SoldierInfo soldier = CmCarbon.GetSoldierInfo(LifeMCamp.ATTACK, soldierID); if (soldier.m_soldier_type == 0) // С¹Ö { headItem.Scale = 0.3f; headItem.IsBoss = false; } else if (soldier.m_soldier_type == 1) // BOSS { headItem.Scale = 0.5f; headItem.IsBoss = true; MyHead.FxBossComming.gameObject.SetActive(false); MyHead.FxBossComming.gameObject.SetActive(true); } headItem.ShowPortrait(PortraitPartType.Portrait, soldier.m_modeltype); mHeadItems[soldierID] = headItem; mCurrentMonster++; MyHead.LblFireProgress.text = string.Format("{0}/{1}", mCurrentMonster, mMonsterCount); }