Esempio n. 1
0
    //각각의 캐릭터 패널들 초기화
    public void InitToggle()
    {
        //1.전체, 2. 지휘관, 3. 근거리, 4. 원거리, 5. 즐겨찾기

        //ActivePanel (E_PREPAREBATTLE_CHARCTERTYPE.E_PREPAREBATTLE_CHARCTERTYPE_COMMANDER);
        //ActivePanel (E_PREPAREBATTLE_CHARCTERTYPE.E_PREPAREBATTLE_CHARCTERTYPE_MELEE);
        //ActivePanel (E_PREPAREBATTLE_CHARCTERTYPE.E_PREPAREBATTLE_CHARCTERTYPE_RANGE);
        //ActivePanel (E_PREPAREBATTLE_CHARCTERTYPE.E_PREPAREBATTLE_CHARCTERTYPE_FAVORITE);

        toggle[(int)E_MERCENARYMANAGE.TOTAL].onValueChanged.AddListener(
            (x) => ActivePanel(E_MERCENARYMANAGE.TOTAL));

        toggle[(int)E_MERCENARYMANAGE.COMMANDER].onValueChanged.AddListener(
            (x) => ActivePanel(E_MERCENARYMANAGE.COMMANDER));

        toggle[(int)E_MERCENARYMANAGE.MELEE].onValueChanged.AddListener(
            (x) => ActivePanel(E_MERCENARYMANAGE.MELEE));

        toggle[(int)E_MERCENARYMANAGE.RANGE].onValueChanged.AddListener(
            (x) => ActivePanel(E_MERCENARYMANAGE.RANGE));

        toggle[(int)E_MERCENARYMANAGE.FAVOIRTE].onValueChanged.AddListener(
            (x) => ActivePanel(E_MERCENARYMANAGE.FAVOIRTE));


        Debug.Log("init Toggle!!");


        //실질적인 아이템 탭 할당
        //전체
        //mercenaryTotalCharacter = mercenaryEachTopPanel[(int)E_MERCENARYMANAGE.TOTAL].gameObject.transform.GetChild(1).transform.GetChild(0).gameObject.AddComponent<MercenaryTotalCharacter>();
        mercenaryTotalCharacter = mercenaryEachTopPanel[(int)E_INVENTORY.E_INVENTORY_TOTAL].gameObject.transform.GetChild(1).transform.GetChild(0).GetComponent <MercenaryTotalCharacter>();
        mercenaryTotalCharacter.Init();
        ActivePanel(E_MERCENARYMANAGE.TOTAL);
    }
 public void Init(MercenaryTotalCharacter _merTotalCharacterPanel)
 {
     character                    = new DBBasicCharacter();
     ActiveSlot_Image             = this.gameObject.transform.GetChild(0).GetComponent <Image>();
     Name_Text                    = this.gameObject.transform.GetChild(1).GetComponent <Text>();
     CharacterImage               = this.gameObject.transform.GetChild(2).GetComponent <Image>();
     Level_Text                   = this.gameObject.transform.GetChild(3).GetComponent <Text>();
     Hp_Slider                    = this.gameObject.transform.GetChild(4).GetComponent <Slider>();
     Hp_Text                      = this.gameObject.transform.GetChild(5).GetComponent <Text>();
     initSlotPosition             = this.gameObject.GetComponent <RectTransform>().anchoredPosition;
     mercenaryTotalCharacterPanel = _merTotalCharacterPanel;
 }