/// <summary>
    /// 레벨에 따른 난투장 셋팅
    /// </summary>
    void SetBattleInfo()
    {
        uint lv = NetData.instance.GetUserInfo()._Level;
        List <DungeonTable.FreefightTableInfo> list = _LowDataMgr.instance.GetLowDataFreeFightList();

        DungeonTable.FreefightTableInfo myLevelStage = null;//나의렙..
        for (int i = 0; i < list.Count; i++)
        {
            if (NetData.instance.UserLevel >= list[i].MinenterLv && list[i].MaxenterLv >= NetData.instance.UserLevel)
            {
                myLevelStage = list[i];
                break;
            }
        }

        LevelBattle.transform.FindChild("Title").GetComponent <UILabel>().text   = string.Format(_LowDataMgr.instance.GetStringCommon(1223), myLevelStage.MinenterLv, myLevelStage.MaxenterLv);
        LevelBattle.transform.FindChild("Explain").GetComponent <UILabel>().text = string.Format(_LowDataMgr.instance.GetStringCommon(1224), myLevelStage.MinenterLv, myLevelStage.MaxenterLv);
        LevelBattle.transform.FindChild("Mon/icon/icon").GetComponent <UISprite>().spriteName = _LowDataMgr.instance.GetMonsterInfo(uint.Parse(myLevelStage.RegenCBossIdx.list[0])).PortraitId;

        MyLevelStageIdx = myLevelStage.StageIndex;

        //자유
        FreeLevelStageIdx = list[list.Count - 1].StageIndex;
        FreeBattle.transform.FindChild("Mon/icon/icon").GetComponent <UISprite>().spriteName = _LowDataMgr.instance.GetMonsterInfo(uint.Parse(list[list.Count - 1].RegenCBossIdx.list[0])).PortraitId;

        //첨에는 일단 일반으로.. 그뒤는 마지막선택했던곳으로 (이건후에)
        OnClickBattleStage(false);
    }
Ejemplo n.º 2
0
    public void SetResenMonster(int freefightMapType)
    {
        // 몬스터리젠위치
        MonsterArea.gameObject.SetActive(true);


        List <DungeonTable.FreefightTableInfo> list = _LowDataMgr.instance.GetLowDataFreeFightList();

        DungeonTable.FreefightTableInfo freeInfo = null;
        for (int i = 0; i < list.Count; i++)
        {
            if (list[i].StageIndex != freefightMapType)
            {
                continue;
            }

            freeInfo = list[i];
        }

        /*//보류
         * for (int i = 0; i < MonsterArea.childCount; i++)
         * {
         *  List<string> resenPos = new List<string>();
         *  switch (i)
         *  {
         *      case 0:
         *          resenPos = freeInfo.RegenMob1.list;
         *          break;
         *      case 1:
         *          resenPos = freeInfo.RegenMob2.list;
         *          break;
         *      case 2:
         *          resenPos = freeInfo.RegenMob3.list;
         *          break;
         *      case 3:
         *          resenPos = freeInfo.RegenMob4.list;
         *          break;
         *
         *  }
         *
         *  int resenX = 0;
         *  int resenY = 0;
         *
         *  int tmpX = Mathf.Abs((int.Parse(resenPos[0]) - int.Parse(resenPos[2])) / 2);
         *  if ((int.Parse(resenPos[0]) > int.Parse(resenPos[2])))
         *      resenX = int.Parse(resenPos[2]) + tmpX;
         *  else
         *      resenX = int.Parse(resenPos[0]) + tmpX;
         *
         *
         *  int tmpY = Mathf.Abs((int.Parse(resenPos[1]) - int.Parse(resenPos[3])) / 2);
         *  if ((int.Parse(resenPos[1]) > int.Parse(resenPos[3])))
         *      resenY = int.Parse(resenPos[3]) + tmpY;
         *  else
         *      resenY = int.Parse(resenPos[1]) + tmpY;
         *
         *  Vector3 monsterResenPos = NaviTileInfo.instance.GetTilePos(resenX, resenY);
         *
         *  monsterResenPos.x = (monsterResenPos.x * Detail.localSize.x) / WorldScale[1].x;
         *  monsterResenPos.y = (monsterResenPos.z * Detail.localSize.y) / WorldScale[1].y;
         *  monsterResenPos.z = 0;
         *
         *  Vector2 mapPos = Detail.transform.localPosition;
         *  monsterResenPos.x = (monsterResenPos.x - mapPos.x) - Offset[1].x;
         *  monsterResenPos.y = (monsterResenPos.y - mapPos.y) - Offset[1].y;
         *
         *  MonsterArea.GetChild(i).localPosition = monsterResenPos;
         *
         * }
         */
        Detail.transform.localPosition = DetailTexturePos[1];
    }