Пример #1
0
    public void RouletteStart(MasuItem _masuItem, Action <DataItem> _onFinished)
    {
        m_goRoot.SetActive(true);
        m_currentMasuItem = _masuItem;

        string result_json = _masuItem.GetItemRouletteResult(m_bannerList.Count);

        MasuItem.ItemResult result_data = JsonUtility.FromJson <MasuItem.ItemResult>(result_json);

        List <DataItem> buf = new List <DataItem>();

        for (int i = 0; i < m_bannerList.Count; i++)
        {
            buf.Add(_masuItem.m_getItemList.Find(p => p.item_key == result_data.keys[i]));
        }

        RouletteStart(buf, result_data.result_index, (value) =>
        {
            _onFinished.Invoke(value);
        });
    }
Пример #2
0
    public void MoveRequest(int _iMove)
    {
        m_fieldMenu.gameObject.SetActive(false);
        currentPlayer.gameObject.GetComponent <PlayerMover>().Request(_iMove, () =>
        {
            Debug.Log("移動完了");

            Masu masu = MasuManager.Instance.GetMasu(currentPlayer.playerData.masu_id);
            if (masu.m_eType == Masu.TYPE.ITEM)
            {
                MasuItem masu_item = masu.gameObject.GetComponent <MasuItem>();
                m_panelItemRoulette.RouletteStart(masu_item, (value) =>
                {
                    Debug.Log(value.item_name);
                    ChangeNextPlayer();
                });
            }
            else
            {
                ChangeNextPlayer();
            }
        });
    }