Пример #1
0
    private void InitCompoent()
    {
        itemName      = GetComponent <Text>        ("left/base/name");
        costItemName  = GetComponent <Text>        ("xiaohao/exp/total_tip");
        costItemIcon  = GetComponent <Image>       ("xiaohao/exp/exp_img");
        equipState    = GetComponent <Transform>   ("left/base/equiped_img");
        rightIconRoot = GetComponent <Transform>   ("item");
        excuteButton  = GetComponent <Button>      ("summon_Btn");
        costCoin      = GetComponent <Text>        ("xiaohao/comsume/consume_Txt");
        costItem      = GetComponent <Text>        ("xiaohao/exp/total_swallow");
        portrait      = GetComponent <Image>       ("sprite");
//        attributeTemp   = GetComponent<Transform>   ("left/top/layoutGroup/attribute");
//        attributeRoot   = attributeTemp?.parent;
//        attributeTemp.SafeSetActive(false);

        var typeIconRoot = GetComponent <Transform>("left/base/name/icon");
        var iconNames    = new string[]
        {
            "sword", "katana", "axe", "fist", "pistol", "suit"
        };

        typeIcons.Clear();
        for (var i = 0; i < iconNames.Length; i++)
        {
            typeIcons.Add(typeIconRoot.GetComponent <Image>(iconNames[i]));
        }

        successWindow = SubWindowBase.CreateSubWindow <FurnaceWindow_SoulSuccess>(this, GetComponent <Transform>("result_Panel")?.gameObject);
        summonWindow  = SubWindowBase <Window_Soul> .CreateSubWindow <FurnaceWindow_SoulSummon> (this, GetComponent <Transform>("summon_Panel")?.gameObject);

        tipWindow = SubWindowBase <Window_Soul> .CreateSubWindow <FurnaceWindow_SoulTip>    (this, GetComponent <Transform>("jipin")?.gameObject);

        soulEntry = new SoulEntry(GetComponent <Transform>("left"));
    }
 protected override void InitComponent()
 {
     base.InitComponent();
     sprite       = WindowCache.GetComponent <Image>   ("jipin/item/rune");
     spriteShadow = WindowCache.GetComponent <Image>   ("jipin/item/spriteShadow");
     clickButton  = WindowCache.GetComponent <Button>  ("jipin");
     soulEntry    = new SoulEntry(WindowCache.GetComponent <Transform>("jipin/item"));
 }
Пример #3
0
 protected override void InitComponent()
 {
     base.InitComponent();
     itemRoot        = WindowCache.GetComponent <Transform>   ("result_Panel/item");
     discardButton   = WindowCache.GetComponent <Button>      ("result_Panel/revert_Btn");
     applyButton     = WindowCache.GetComponent <Button>      ("result_Panel/save_Btn");
     discardCost     = WindowCache.GetComponent <Text>        ("result_Panel/revert_Btn/consume_Txt");
     discardCostIcon = WindowCache.GetComponent <Image>       ("result_Panel/revert_Btn/icon");
     leftPortrait    = WindowCache.GetComponent <Image>       ("result_Panel/left/sprite");
     rightPortrait   = WindowCache.GetComponent <Image>       ("result_Panel/right/sprite");
     leftEntry       = new SoulEntry(WindowCache.GetComponent <Transform>("result_Panel/before"));
     rightEntry      = new SoulEntry(WindowCache.GetComponent <Transform>("result_Panel/after"));
 }
Пример #4
0
    protected override void OnOpen()
    {
        m_attrList.Clear();
        m_suitList.Clear();

        m_leftTopPlane = GetComponent <RectTransform>("left");
        m_leftDesc     = GetComponent <Text>("left/bottom/mask/content");
        //器灵
        m_spriteNo = GetComponent <Text>("right/bottom/nothing");

        m_attriPrefab = GetComponent <RectTransform>("right/top/content/type").gameObject;
        m_attriParent = GetComponent <RectTransform>("right/top/content");

        m_suitHave     = GetComponent <RectTransform>("right/middle/have");
        m_suitNo       = GetComponent <Text>("right/middle/nothing");
        m_suitState    = GetComponent <Text>("right/middle/have/state");
        m_btnClearSuit = GetComponent <Button>("right/middle/have/clear_Btn");

        m_btnGroup = GetComponent <RectTransform>("buttons");

        m_strengBtn    = GetComponent <Button>("buttons/0");
        m_advancedBtn  = GetComponent <Button>("buttons/1");
        m_soulBtn      = GetComponent <Button>("buttons/2");
        m_orderBtn     = GetComponent <Button>("buttons/3");
        m_sublimaBtn   = GetComponent <Button>("buttons/4");
        m_spiritBtn    = GetComponent <Button>("buttons/5");
        m_strengHint   = GetComponent <Image>("buttons/0/mark").gameObject;
        m_advancedHint = GetComponent <Image>("buttons/1/mark").gameObject;
        m_soulHint     = GetComponent <Image>("buttons/2/mark").gameObject;
        m_orderHint    = GetComponent <Image>("buttons/3/mark").gameObject;
        m_sublimaHint  = GetComponent <Image>("buttons/4/mark").gameObject;
        m_spiritHint   = GetComponent <Image>("buttons/5/mark").gameObject;

        m_suitProperty = new SuitProperty(GetComponent <Transform>("right/middle/have"));
        m_clearSuit    = SubWindowBase.CreateSubWindow <EquipInfoWindow_ClearSuit, Window_Equipinfo>(this, GetComponent <Transform>("tip")?.gameObject);
        m_clearSuit.Set(false);
        soulEntry = new SoulEntry(GetComponent <Transform>("right/bottom"));
        SetText();
    }