Example #1
0
    protected virtual void CreateWallItem(int posX, int posY, int posN, int id)
    {
        GameObject item = list.NewItem();

        item.name = posX + "_" + posY + "_" + posN;

        EditItem itemCtr = item.GetComponent <EditItem>();

        itemCtr.type    = type;
        itemCtr.gridPos = new Vector3(posX, posY, posN);
        itemCtr.icon    = id;
        PosMgr.SetWallPos(item.transform, posX, posY, posN, 0.4f);
        itemCtr.zrotate = GetZRotate(posN);
        EventTriggerListener.Get(item).onClick = itemCtr.OnCellClick;
    }