예제 #1
0
 private void _Show_Buff(GameObject node, int buffid, bool bSelected)
 {
     if (buffid == 0)
     {
         node.CustomSetActive(false);
     }
     else
     {
         GameObject obj2            = Utility.FindChild(node, "bg_frame");
         GameObject obj3            = Utility.FindChild(node, "mark");
         Text       componetInChild = Utility.GetComponetInChild <Text>(node, "description");
         obj2.CustomSetActive(bSelected);
         obj3.CustomSetActive(bSelected);
         BurnExpeditionModel model = Singleton <BurnExpeditionController> .instance.model;
         componetInChild.text = model.Get_Buff_Description(buffid);
         Image  image = Utility.GetComponetInChild <Image>(node, "icon");
         string str   = model.Get_Buff_Icon(buffid);
         if ((image != null) && !string.IsNullOrEmpty(str))
         {
             image.SetSprite(str, this.map_fromScript, true, false, false);
         }
     }
 }
예제 #2
0
        private void _Show_Buff(GameObject node, int buffid, bool bSelected)
        {
            if (buffid == 0)
            {
                node.CustomSetActive(false);
                return;
            }
            GameObject obj             = Utility.FindChild(node, "bg_frame");
            GameObject obj2            = Utility.FindChild(node, "mark");
            Text       componetInChild = Utility.GetComponetInChild <Text>(node, "description");

            obj.CustomSetActive(bSelected);
            obj2.CustomSetActive(bSelected);
            BurnExpeditionModel model = Singleton <BurnExpeditionController> .get_instance().model;

            componetInChild.text = model.Get_Buff_Description(buffid);
            Image  componetInChild2 = Utility.GetComponetInChild <Image>(node, "icon");
            string text             = model.Get_Buff_Icon(buffid);

            if (componetInChild2 != null && !string.IsNullOrEmpty(text))
            {
                componetInChild2.SetSprite(text, this.map_fromScript, true, false, false, false);
            }
        }