コード例 #1
0
    public override void initButton(int i)
    {
        if (nodeList [i] == null)
        {
            nodeList [i] = NGUITools.AddChild(gameObject, (fatherWindow as ArenaNavigateWindow).arenaButtonPrefab);
        }
        nodeList [i].SetActive(true);
        ButtonArenaItem button = nodeList [i].GetComponent <ButtonArenaItem> ();

        button.fatherWindow = fatherWindow;
    }
コード例 #2
0
    public override void  updateItem(GameObject item, int index)
    {
        ButtonArenaItem   button = item.GetComponent <ButtonArenaItem> ();
        ArenaActivityInfo info   = arenaList[index];

        switch (info.type)
        {
        case EnumArena.arena:
            button.updateActive(info, backgroundTextures [0]);
            break;

        case EnumArena.ladders:
            button.updateActive(info, backgroundTextures [1]);
            break;

        case EnumArena.mineral:
            button.updateActive(info, backgroundTextures [2]);
            break;
        }
    }