コード例 #1
0
    private int createActionButtons()
    {
        int createdButtonCount = 0;

        ActionObject actionTable = Manager.Instance.DT.Action;

        int count = actionTable.Count;

        for (int id = 0; id < count; ++id)
        {
            if (_actionType != actionTable[id].type)
            {
                continue;
            }

            GameObject o = Instantiate(PrefActionButton);
            o.transform.SetParent(_content, false);

            ActionButton btn = o.GetComponent <ActionButton>();
            btn.SetActionId(id);

            ++createdButtonCount;
        }

        return(createdButtonCount);
    }