Beispiel #1
0
    public void Initialize(DataItemParam _param, MasterItemParam _master)
    {
        m_tempDataParam = _param;

        m_txtName.text = _master.name;

        m_txtDetail.text = _master.detail;

        m_imgIcon.sprite = SpriteManager.Instance.Get(_master.sprite_holder, _master.sprite_name);
        m_imgIcon.color  = _master.GetSpriteColor();


        string strNum = "";

        if (_master.item_id / MasterItem.LargeCategory <= MasterItem.CategoryMagic)
        {
            strNum = string.Format("[{0}]", _param.num);
        }
        else
        {
            strNum = string.Format("[{1}{0}]", _param.craft_count < _master.limit ? _param.craft_count.ToString() : "★", "+");
        }
        m_txtNum.text = strNum;

        m_imgIcon.sprite = SpriteManager.Instance.Get(_master.sprite_holder, _master.sprite_name);
        m_imgIcon.color  = _master.GetSpriteColor();
    }
Beispiel #2
0
    public void Initialize(DataItemParam _param, MasterItemParam _master)
    {
        m_dataItem = _param;

        string strName = _master.name;

        if (0 < _param.craft_count)
        {
            strName = string.Format("{0}+{1}", _master.name, _param.craft_count);
        }
        m_textName.text  = strName;
        m_txtDetail.text = _master.detail;

        m_imgIcon.sprite = SpriteManager.Instance.Get(_master.sprite_holder, _master.sprite_name);
        m_imgIcon.color  = _master.GetSpriteColor();

        if (m_btn == null)
        {
            m_btn = gameObject.GetComponent <Button>();
            m_btn.onClick.AddListener(() =>
            {
                HandleBannerEvent.Invoke(m_dataItem);
            });
        }
    }
Beispiel #3
0
    public void Initialize(MasterItemParam _master)
    {
        if (_master == null)
        {
            gameObject.SetActive(false);
            return;
        }

        m_imgIcon.sprite = SpriteManager.Instance.Get(_master.sprite_name);
        m_imgIcon.color  = _master.GetSpriteColor();
        m_txtName.text   = _master.name;

        m_txtBikou.text = "";

        if (_master.item_id / MasterItem.LargeCategory == MasterItem.CategoryWeapon)
        {
            m_txtBikou.text = string.Format("ATK:{0}", _master.param);
        }
        else if (_master.item_id / MasterItem.LargeCategory == MasterItem.CategoryArmor)
        {
            m_txtBikou.text = string.Format("DEF:{0}", _master.param);
        }
        else
        {
            m_txtBikou.text = "";
        }

        gameObject.SetActive(true);
    }
Beispiel #4
0
    public void Initialize(MasterItemParam _param)
    {
        m_txtName.text   = _param.name;
        m_txtDetail.text = _param.detail;

        m_txtNum.text         = string.Format("{0}", _param.price.ToString());
        m_tempMasterItemParam = _param;

        m_imgIcon.sprite = SpriteManager.Instance.Get(_param.sprite_holder, _param.sprite_name);
        m_imgIcon.color  = _param.GetSpriteColor();
    }
Beispiel #5
0
    public void Initialize(DataItemParam _data)
    {
        m_iItemSerial = _data.serial;

        int  iIndex = 0;
        bool exist  = GameMain.Instance.panelStatus.m_panelShortcuts.CheckSerial(m_iItemSerial, ref iIndex);

        // 外すは例外
        if (_data.item_id == 0)
        {
            exist = false;
        }
        m_goSet.SetActive(exist);

        if (_data.item_id == 0)
        {
            m_imgIcon.sprite = SpriteManager.Instance.Get("UI_Icon_GenderMale2");
            m_imgIcon.color  = Color.white;

            m_txtNum.text    = "はずす";
            m_txtName.text   = "ショートカットを\n未設定状態にします";
            m_txtDetail.text = "";

            return;
        }


        MasterItemParam master = DataManager.Instance.masterItem.list.Find(p => p.item_id == _data.item_id);

        m_imgIcon.sprite = SpriteManager.Instance.Get(master.sprite_holder, master.sprite_name);
        m_imgIcon.color  = master.GetSpriteColor();

        string strNum = "";

        if (master.item_id / MasterItem.LargeCategory <= MasterItem.CategoryMagic)
        {
            strNum = string.Format("[{0}]", _data.num);
        }
        else
        {
            strNum = string.Format("[{1}{0}]", _data.craft_count < master.limit ? _data.craft_count.ToString() : "★", "+");
        }

        m_txtNum.text = strNum;

        m_txtName.text   = master.name;
        m_txtDetail.text = master.detail;
    }
Beispiel #6
0
    public void Initialize(DataItemParam _data)
    {
        MasterItemParam master = DataManager.Instance.masterItem.list.Find(p => p.item_id == _data.item_id);

        m_txtName.text   = master.name;
        m_txtDetail.text = master.detail;

        m_imgIcon.sprite = SpriteManager.Instance.Get(master.sprite_holder, master.sprite_name);
        m_imgIcon.color  = master.GetSpriteColor();

        m_data = _data;
        m_btn.onClick.AddListener(() =>
        {
            OnBannerEvent.Invoke(m_data);
        });
    }
Beispiel #7
0
    public void SetShortcut(int _iItemSerial)
    {
        m_iItemSerial = _iItemSerial;
        //Debug.Log(m_iItemSerial);
        if (m_iItemSerial == 0)
        {
            Empty();
            return;
        }

        m_dataSetItemParam   = DataManager.Instance.dataItem.list.Find(p => p.serial == _iItemSerial);
        m_masterSetItemParam = DataManager.Instance.masterItem.list.Find(p => p.item_id == m_dataSetItemParam.item_id);

        NumUpdate();

        m_imgIcon.sprite = SpriteManager.Instance.Get(m_masterSetItemParam.sprite_holder, m_masterSetItemParam.sprite_name);
        m_imgIcon.color  = m_masterSetItemParam.GetSpriteColor();
    }
Beispiel #8
0
    public void Refresh()
    {
        int item_serial = DataManager.Instance.user_data.ReadInt(MasterItem.GetEquipIndexName(equip_index));

        //Debug.Log(string.Format("index={0} serial={1}",equip_index, item_serial));
        //Debug.Log(m_equipData);

        if (0 < item_serial)
        {
            m_equipData = DataManager.Instance.dataItem.list.Find(p => p.serial == item_serial);
        }
        else
        {
            m_equipData = null;
        }

        if (m_equipData != null)
        {
            m_equipMaster = DataManager.Instance.masterItem.list.Find(p => p.item_id == m_equipData.item_id);
        }
        else
        {
            m_equipMaster = null;
        }

        string strName = "装備なし";

        if (m_equipMaster != null)
        {
            strName         = m_equipMaster.GetItemName(m_equipData.craft_count);
            m_imgIcon.color = m_equipMaster.GetSpriteColor();
        }
        else
        {
            m_imgIcon.color = Color.white;
        }
        m_txtName.text = strName;
    }
Beispiel #9
0
    public void Show(int _iItemSerial)
    {
        data_param   = DataManager.Instance.dataItem.list.Find(p => p.serial == _iItemSerial);
        master_param = DataManager.Instance.masterItem.list.Find(p => p.item_id == data_param.item_id);

        m_txtDetail.text = master_param.detail;

        if (master_param.item_id / MasterItem.LargeCategory == MasterItem.CategoryAccessary)
        {
            string seinou = "";

            MasterAccessaryParam accessary = DataManager.Instance.masterAccessary.list.Find(p => p.item_id == master_param.item_id);
            MasterItemParam      use_item  = DataManager.Instance.masterItem.list.Find(p => p.item_id == accessary.use_item_id);
            if (0 < accessary.hp_rate)
            {
                seinou = string.Format("ショートカットにセットしている時、<color=#FF0>HPが{0}%未満</color>になると、<color=#0FF>{1}</color>を使用。({2:0.0}秒間隔)", accessary.hp_rate, use_item.name, accessary.interval);
            }
            else if (0 < accessary.stamina_rate)
            {
                seinou = string.Format("ショートカットにセットしている時、<color=#FF0>Staminaが{0}%未満</color>になると、<color=#0FF>{1}</color>を使用。({2:0.0}秒間隔)", accessary.hp_rate, use_item.name, accessary.interval);
            }
            if (accessary.situation == 1)
            {
                seinou += "<color=red>効果はバトル中のみ</color>";
            }
            m_txtDetail.text += "\n" + seinou;

            /*
             */
        }


        m_btnAct.interactable = true;

        if (master_param.item_id == 11001)
        {
            if (Advertisement.IsReady())
            {
                m_txtDetail.text += "\n<color=green>現在使用可能です</color>";
            }
            else
            {
                m_txtDetail.text += "\n<color=red>現在使用できません。しばらく時間を空けて下さい</color>";
            }
        }

        m_imgIcon.sprite = SpriteManager.Instance.Get(master_param.sprite_holder, master_param.sprite_name);
        m_imgIcon.color  = master_param.GetSpriteColor();

        if (master_param.item_id / MasterItem.LargeCategory <= MasterItem.CategoryMagic)
        {
            m_txtName.text   = master_param.name;
            m_txtAct.text    = "使用";
            m_txtDelete.text = "捨てる";
        }
        else if (master_param.item_id / MasterItem.LargeCategory == MasterItem.CategorySkin)
        {
            m_txtName.text   = master_param.name;
            m_txtAct.text    = "----";
            m_txtDelete.text = "捨てる";
        }
        else if (master_param.item_id / MasterItem.LargeCategory == MasterItem.CategoryAccessary)
        {
            m_txtName.text   = master_param.name;
            m_txtAct.text    = "----";
            m_txtDelete.text = "捨てる";

            m_btnAct.interactable    = false;
            m_btnDelete.interactable = false;
        }
        else
        {
            m_txtName.text   = master_param.GetItemName(data_param.craft_count);
            m_txtAct.text    = "装備";
            m_txtDelete.text = string.Format("Gem変換\n{0}個", data_param.craft_count);;
        }
    }