public static void AddRockImage(GameObject _objParent, int _dSlotIndex, string _strNeed) { GameObject RockImage = ResourceLoad.GetEzGuiTexture(ScrollData.objIconRock_56_76); GameObject RockMent = new GameObject(); RockImage.name = "RockImage_" + _dSlotIndex; RockMent.name = "RockMent_" + _dSlotIndex; ResourceLoad.SetSpriteText_OutLine(RockMent, ScrollData.objSpriteText24, ScrollData.objSpriteText_stroke24); RockMent.GetComponent <EzGui_SpriteText_Outline>().SetColor(new Color(0.7451f, 0.0f, 0.0f), Color.white); RockMent.GetComponent <EzGui_SpriteText_Outline>().SetAnchor(SpriteText.Anchor_Pos.Middle_Center); RockMent.GetComponent <EzGui_SpriteText_Outline>().SetAllignment(SpriteText.Alignment_Type.Center); RockMent.GetComponent <EzGui_SpriteText_Outline>().SetText(_strNeed); if (RockImage.GetComponent <EzGui_Texture>()) { RockImage.GetComponent <EzGui_Texture>().GetEZGUITexture().anchor = SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER; } // RockImage.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f); RockImage.transform.localPosition = m_posRockImage; RockMent.transform.localPosition = m_posRockMent; RockImage.transform.parent = _objParent.transform; RockMent.transform.parent = _objParent.transform; }
public static void AddNewMarkToContainer(GameObject _objContainer, int _dSlotIndex) { GameObject NewMark = ResourceLoad.GetEzGuiTexture(ScrollData.objShopIconNewMark); NewMark.name = "NewMark_" + _dSlotIndex; NewMark.transform.localPosition = m_posNewMark; _objContainer.GetComponent <UIListItemContainer>().MakeChild(NewMark); }
public static void AddCompMarkToContainer(GameObject _objContainer, int _dSlotIndex, UnityEngine.Object _Prefab) { GameObject CompMark = ResourceLoad.GetEzGuiTexture(_Prefab); CompMark.name = "SlotComp"; // CompMark.name = "Comp_"+_dSlotIndex; CompMark.GetComponent <EzGui_Texture>().SetTextureSize(150.0f, 136.0f); CompMark.transform.localPosition = m_posCompMark; _objContainer.GetComponent <UIListItemContainer>().MakeChild(CompMark); }
public static void AddImageToContainer_MiddleCenter(GameObject _objContainer, int _dSlotIndex, GameObject _objImage, float _fImagePercentage) { //Add Acc GameObject SlotImage = ResourceLoad.GetEzGuiTexture(_objImage); SlotImage.name = m_strSlotImage + _dSlotIndex; SetSlotImage_Middle_Center(SlotImage, _fImagePercentage); SlotImage.transform.localPosition = m_posShopImage_MiddleCenter; _objContainer.GetComponent <UIListItemContainer>().MakeChild(SlotImage); }
private void SetChild() { if (m_dOldNumberCount < m_dNowNumberCount) { for (int i = m_dOldNumberCount; i < m_dNowNumberCount; i++) { GameObject tmpObject = ResourceLoad.GetEzGuiTexture(m_scriptNumberSetManager.GetObjectNumber()); tmpObject.name = string.Format("{0}{1}", "NumberChild_", m_listChild.Count); tmpObject.GetComponent <EzGui_Texture>().SetColor(m_Color); tmpObject.transform.parent = gameObject.transform; tmpObject.GetComponent <EzGui_Texture>().SetValid(Valid); m_listChild.Add(tmpObject); if (m_IsCommaOn) { if (i % 3 == 0 && i != 0) { GameObject tmpObject1 = ResourceLoad.GetEzGuiTexture(m_scriptNumberSetManager.GetObjectNumber()); tmpObject1.name = string.Format("{0}{1}", "NumberChild_", m_listChild.Count); tmpObject1.GetComponent <EzGui_Texture>().SetColor(m_Color); tmpObject1.transform.parent = gameObject.transform; tmpObject1.GetComponent <EzGui_Texture>().SetValid(Valid); m_listChild.Add(tmpObject1); } } } } SetChildPos(); List <int> tmpNumList = new List <int>(); Fuctions.SetNumberList(m_NowNumber, ref tmpNumList); int ListCount = m_listChild.Count; for (int i = 0, count = 0; count < ListCount; i++, count++) { if (m_IsCommaOn) { if (m_dNowNumberCount >= 4) { if ((m_dNowNumberCount - i) % 3 == 0 && i != 0) { m_listChild[count].GetComponent <EzGui_Texture>().GetEZGUITexture().SetUVs(m_scriptNumberSetManager.GetNumberUV(10)); count++; } } } m_listChild[count].GetComponent <EzGui_Texture>().SetcontrolIsEnabled(false); m_listChild[count].GetComponent <EzGui_Texture>().GetEZGUITexture().SetUVs(m_scriptNumberSetManager.GetNumberUV(tmpNumList[i])); } }
public static void AddRealPriceToContainer(GameObject _objContainer, int _dSlotIndex, string _strInitNum) { GameObject SlotBase = ResourceLoad.GetEzGuiTexture(ScrollData.objShopSlotNumPad); GameObject SlotFont = ResourceLoad.GetSpriteText(ScrollData.objSpriteText22); SlotBase.name = "RealPrice" + "SlotBase_" + _dSlotIndex; SlotFont.name = m_strCubeSlotFont + _dSlotIndex; SlotFont.GetComponent <EzGui_SpriteText>().SetText(_strInitNum); SetSlotPos(1, SlotBase, SlotFont, null); _objContainer.GetComponent <UIListItemContainer>().MakeChild(SlotBase); }
public static void AddInvenImageToContainer(GameObject _objContainer, int _dSlotIndex, GameObject _objImage, float _fImagePercentage) { GameObject SlotImage = ResourceLoad.GetEzGuiTexture(_objImage); if (SlotImage == null) { return; } SlotImage.name = m_strSlotImage + _dSlotIndex; SetSlotImage_Bottom_Center(SlotImage, _fImagePercentage); SlotImage.transform.position = m_posInvenImage; _objContainer.GetComponent <UIListItemContainer>().MakeChild(SlotImage); }
public static void AddLimitTimeToContainer(GameObject _objContainer, int _dSlotIndex, int _dSlotBaseIndex, string _strInitNum) { GameObject SlotBase = ResourceLoad.GetEzGuiTexture(ScrollData.objShopSlotNumPad); GameObject SlotFont = ResourceLoad.GetSpriteText(ScrollData.objSpriteText22); GameObject SlotIcon = ResourceLoad.GetEzGuiTexture(ScrollData.objIconSellTime_39_40); SlotBase.name = "LimitTime" + "SlotBase_" + _dSlotIndex; SlotFont.name = m_strLimitTimeSlotFont + _dSlotIndex; SlotIcon.name = "LimitTime" + "SlotIcon_" + _dSlotIndex; SlotFont.GetComponent <EzGui_SpriteText>().SetText(_strInitNum); SetSlotPos(_dSlotBaseIndex, SlotBase, SlotFont, SlotIcon); _objContainer.GetComponent <UIListItemContainer>().MakeChild(SlotBase); }
public static void AddExpToContainer(GameObject _objContainer, int _dSlotIndex, int _dSlotBaseIndex, string _strInitNum) { GameObject SlotBase = ResourceLoad.GetEzGuiTexture(ScrollData.objShopSlotNumPad); GameObject SlotFont = ResourceLoad.GetSpriteText(ScrollData.objSpriteText22); GameObject SlotIcon = ResourceLoad.GetEzGuiTexture(ScrollData.objIconExp_39_40); GameObject SlotVari = ResourceLoad.GetEzGuiTexture(ScrollData.objIconPlus_20_21); SlotBase.name = "Exp" + "SlotBase_" + _dSlotIndex; SlotFont.name = m_strExpSlotFont + _dSlotIndex; SlotIcon.name = "Exp" + "SlotIcon" + _dSlotIndex; SlotVari.name = "Exp" + "SlotVari" + _dSlotIndex; SlotFont.GetComponent <EzGui_SpriteText>().SetText(_strInitNum); SetSlotPos(_dSlotBaseIndex, SlotBase, SlotFont, SlotIcon, SlotVari); _objContainer.GetComponent <UIListItemContainer>().MakeChild(SlotBase); }
public void SetKittyLeg(Object _BaseObj) { if (m_imgKittyLeg != null) { return; } GameObject tmpObj = ResourceLoad.GetEzGuiTexture(_BaseObj); if (tmpObj.GetComponent <EzGui_Texture>()) { m_imgKittyLeg = tmpObj.GetComponent <EzGui_Texture>(); m_imgKittyLeg.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); } tmpObj.name = "KittyLeg"; tmpObj.layer = m_LayerMask; tmpObj.transform.parent = m_imgKittyHead.gameObject.transform; tmpObj.transform.localPosition = m_LegPos; SetTmpEffectZero(); tmpObj.transform.localScale = m_vecTmp; }