Beispiel #1
0
    public void SetResource(GameResourceManager ResourceObject, string SlotName)
    {
        if (ResourceObject != null)
        {
            m_imgBoard = ResourceObject.GetResource(string.Format("{0}{1}{2}", "TEXTURE_", SlotName, "Board")).GetComponent <EzGui_Texture>();
            m_imgIcon  = ResourceObject.GetResource(string.Format("{0}{1}{2}", "TEXTURE_", SlotName, "Icon")).GetComponent <EzGui_Texture>();
            m_btnAdd   = ResourceObject.GetResource(string.Format("{0}{1}{2}", "BUTTON_", SlotName, "Add")).GetComponent <EzGui_Button>();
            m_txtNum   = ResourceObject.GetResource(string.Format("{0}{1}{2}", "SPRITE_", SlotName, "Num")).GetComponent <EzGui_SpriteText>();

            SetResources();
        }
    }
Beispiel #2
0
 protected GameObject GetResource(string _ResourceName)
 {
     if (m_ResourceScript != null)
     {
         return(m_ResourceScript.GetResource(_ResourceName));
     }
     return(null);
 }