public override void SetData() { CMD_Picturebook cmd_Picturebook = (CMD_Picturebook)base.GetInstanceCMD(); this._monsterDataList.Clear(); for (int i = 0; i < this._monsterIconList.Count; i++) { int listId = base.IDX * PicturebookItem.ITEM_COUNT_PER_LINE + i; PicturebookMonster monsterData = cmd_Picturebook.GetMonsterData(listId); this._monsterDataList.Add(monsterData); } }
public static void MakeAllMonsterTex(CMD_Picturebook cmd, int allMonsterCount) { for (int i = 0; i < allMonsterCount; i++) { PicturebookMonster monsterData = cmd.GetMonsterData(i); if (monsterData == null) { break; } string iconId = monsterData.monsterMaster.Simple.iconId; string monsterIconPathByIconId = GUIMonsterIcon.GetMonsterIconPathByIconId(iconId); string resourcePath = GUIMonsterIcon.InternalGetMonsterIconPathByIconId(iconId); PicturebookItem.TextureData textureData = new PicturebookItem.TextureData(); textureData._monsterTexture = new Texture2D(PicturebookItem.ICON_TEXTURE_CX, PicturebookItem.ICON_TEXTURE_CY); textureData._monsterAlphaTexture = new Texture2D(PicturebookItem.ICON_TEXTURE_CX, PicturebookItem.ICON_TEXTURE_CY); PicturebookMonsterIcon.SetTextureMonsterParts(ref textureData, resourcePath, monsterIconPathByIconId); PicturebookItem._monsterTextureDataList.Add(textureData); } }
public override void RefreshParts() { CMD_Picturebook @object = (CMD_Picturebook)base.GetInstanceCMD(); for (int i = 0; i < this._monsterIconList.Count; i++) { if (this._monsterDataList[i] != null) { if (!this._monsterIconList[i].gameObject.activeSelf) { this._monsterIconList[i].gameObject.SetActive(true); } int listIndex = base.IDX * PicturebookItem.ITEM_COUNT_PER_LINE + i; this.SetIconMonsterData(listIndex, this._monsterIconList[i], this._monsterDataList[i], new Action <PicturebookMonster>(@object.PressMIconShort)); } else if (this._monsterIconList[i].gameObject.activeSelf) { this._monsterIconList[i].gameObject.SetActive(false); } } }