示例#1
0
 public void BuildNewMineStronghold(LD_Objs lD_Objs)
 {
     if (mapView != null)
     {
         mapView.BuildNewSHItem(lD_Objs);
     }
 }
示例#2
0
    public void ClickSelectStrongholdDrawing(int strongholdDrawingIndex)
    {
        //先判断一下图纸够不够
        LD_Objs lD_Objs = AndaDataManager.Instance.mainData.strongholdDrawingList.FirstOrDefault(s => s.objIndex == strongholdDrawingIndex);

        if (lD_Objs.lessCount >= 1)
        {
            mapCtrlData.BuildNewMineStronghold(lD_Objs);
        }
        else
        {
            AndaUIManager.Instance.PlayTips("该图纸数量不够");
        }
    }
示例#3
0
    public static LD_Objs ConvertToLd_objs(SD_Pag4U sD_Pag4U)
    {
        LD_Objs lD_Objs = new LD_Objs();

        lD_Objs.objID      = sD_Pag4U.objectID;
        lD_Objs.objectType = AndaDataManager.Instance.GetObjTypeID(lD_Objs.objID);
        lD_Objs.objSmallID = lD_Objs.objID - lD_Objs.objectType;
        CD_ObjAttr cD_ObjAttr = AndaDataManager.Instance.objectsList.FirstOrDefault(s => s.objectID == lD_Objs.objectType);

        lD_Objs.objIndex       = sD_Pag4U.objectIndex;
        lD_Objs.objName        = cD_ObjAttr.objectName[lD_Objs.objSmallID];
        lD_Objs.lessCount      = sD_Pag4U.objectCount;
        lD_Objs.giveValue      = sD_Pag4U.objectValue;
        lD_Objs.objDescription = cD_ObjAttr.objectDescription[lD_Objs.objSmallID];
        return(lD_Objs);
    }
示例#4
0
    public void BuildNewSHItem(LD_Objs lD_Objs)
    {
        if (newItem != null)
        {
            Destroy(newItem);
        }
        useStrongholdDrwaing = lD_Objs;
        newItem = AndaDataManager.Instance.GetItemInfoPrefab("ItemInfo_NewSHItem");
        newItem = Instantiate(newItem);
        newItem.transform.parent        = this.transform;
        newItem.transform.localScale    = Vector3.one;
        newItem.transform.localPosition = Vector3.zero;
        //-通过图纸来判断该据点的等级
        Sprite lvBoard = AndaDataManager.Instance.GetBussinessStrongholdLevelSprite(lD_Objs.objSmallID);
        Sprite icon    = AndaDataManager.Instance.GetIconSprite(100);

        newItem.GetComponent <ItemInfo_MapNewShItem>().SetInfo(lvBoard, icon, "", ComfimSetStrongholdHere, CancelAddNewItem);
        newItem.GetComponent <Animator>().Play("up");
    }
示例#5
0
    public void BuildStrongholdDawingList()
    {
        int count = playerData.playerObjects.Count;

        for (int i = 0; i < count; i++)
        {
            int idType = AndaDataManager.Instance.GetObjTypeID(playerData.playerObjects[i].objectID);
            Debug.Log("idType" + idType);
            if (idType == 42010)
            {
                LD_Objs lD_Objs = ConvertTool.ConvertToLd_objs(playerData.playerObjects[i]);
                strongholdDrawingList.Add(lD_Objs);
            }
            else if (idType == 43000)
            {
                LD_Objs lD_Objs = ConvertTool.ConvertToLd_objs(playerData.playerObjects[i]);
                if (playerData.playerObjects[i].objectID == 43004)
                {
                    strongholdRewardCardList.Add(lD_Objs);
                }
            }
        }
    }