Exemplo n.º 1
0
        public void Init(DungeonType dungeonType, List <string> monsterTypes, Point worldIndex, int floor)
        {
            DungeonGenerationAlgorithm dungeonGenerationAlgorithm;

            switch (dungeonType)
            {
            case (DungeonType.RoomPlacement_s):
                dungeonGenerationAlgorithm = new RoomPlacementAlgorithm(this, monsterTypes);
                dungeonGenerationAlgorithm.GenerateDungeon(15, floor, worldIndex);
                break;

            case (DungeonType.Cave_s):
                dungeonGenerationAlgorithm = new CaveGenerationAlgorithm(this, monsterTypes);
                dungeonGenerationAlgorithm.GenerateDungeon(50, floor, worldIndex);
                break;

            case (DungeonType.RoomPlacement_l):
                dungeonGenerationAlgorithm = new RoomPlacementAlgorithm(this, monsterTypes);
                dungeonGenerationAlgorithm.GenerateDungeon(30, floor, worldIndex);
                break;

            default:
                dungeonGenerationAlgorithm = new RoomPlacementAlgorithm(this, monsterTypes);
                dungeonGenerationAlgorithm.GenerateDungeon(15, floor, worldIndex);
                break;
            }
            patrolMaps = new PatrolMaps(100, 100, patrolPoints, this);
        }
Exemplo n.º 2
0
    void Start()
    {
        if (levelManager.isFirstLevel)
        {
        }
        else
        {
            dungeonType = levelManager.dungeonType;
        }

        floorMask = LayerMask.GetMask("Floor");
        wallMask  = LayerMask.GetMask("Wall");

        floorPosition.Clear(); //cleat list,before  a new initialization one

        switch (dungeonType)
        {
        case DungeonType.Cavern:
            RandomWalker();
            break;

        case DungeonType.Rooms:
            RoomWalker();
            break;

        case DungeonType.Winding:
            WindingWalker();
            break;

        case DungeonType.BoosRoom:
            SpawnBoosRoom();
            break;
        }
    }
Exemplo n.º 3
0
        public override string ToLink(bool link = true, DwarfObject pov = null)
        {
            if (link)
            {
                string title = "";
                if (DungeonType != DungeonType.Unknown)
                {
                    title += DungeonType.GetDescription();
                }
                else
                {
                    title += Type.GetDescription();
                }
                title += "&#13";
                title += "Events: " + Events.Count;

                string linkedString = "";
                if (pov != this)
                {
                    linkedString = Icon + "<a href = \"structure#" + GlobalId + "\" title=\"" + title + "\">" + Name + "</a>";
                }
                else
                {
                    linkedString = Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>";
                }
                return(linkedString);
            }
            return(Icon + Name);
        }
Exemplo n.º 4
0
        public void Init()
        {
            GameObject  go = new GameObject();
            Dungeoneer  dg = go.AddComponent <Dungeoneer>();
            DungeonType dt = go.AddComponent <DungeonType>();

            dg.currentDungeonType = dt;
            dg.seed = 5;
            dg.initPRNG();
            dg.generateDelaunay();
            dg.generateVoronoi();

            delVerts = dg.dt.vertices.Count;    // v
            delEdges = dg.dt.edges.Count;       // e

            /* For Delaunay triangulations:
             * "In the plane (d = 2), if there are b vertices on the convex
             * hull, then any triangulation of the points has at most
             * 2n − 2 − b triangles, plus one exterior face."
             */
            int delHull = dg.dt.delaunator.hull.Count;

            delFaces = 2 * delVerts - 1 - delHull; // f

            vorVerts = dg.vd.vertices.Count;       // v
            vorEdges = dg.vd.edges.Count;          // e
            vorFaces = dg.vd.sites.Count + 1;      // f (one exterior)
        }
Exemplo n.º 5
0
        public int GetTotalStarCountOfChapterOfDungeonType(DungeonType dungeonType, int chapterID)
        {
            ChapterData chapterData   = ChapterData.GetChapterDataById(chapterID);
            List <int>  dungeonIDList = chapterData.GetChapterDungeonIDListOfDungeonType(dungeonType);

            return(dungeonIDList.Count * 3);
        }
Exemplo n.º 6
0
        public void SetSelectDungeon(int dungeonID)
        {
            DungeonType dungeonType = DungeonData.GetDungeonDataByID(dungeonID).dungeonType;

            if (_currentSelectDungeonType != dungeonType)
            {
                ResetDifficulty(dungeonType);
            }
            DungeonButton dungeonButton = null;

            if (_easyDungeonButtonDic.ContainsKey(dungeonID))
            {
                _easyDungeonButtonDic.TryGetValue(dungeonID, out dungeonButton);
            }
            else if (_normalDungeonButtonDic.ContainsKey(dungeonID))
            {
                _normalDungeonButtonDic.TryGetValue(dungeonID, out dungeonButton);
            }
            else if (_hardDungeonButtonDic.ContainsKey(dungeonID))
            {
                _hardDungeonButtonDic.TryGetValue(dungeonID, out dungeonButton);
            }

            ChapterData chapterData = ChapterData.GetChapterDataContainsDungeon(dungeonID);

            MoveTo(chapterData);
        }
Exemplo n.º 7
0
        public static DungeonStarData GetDungeonStarData(DungeonType dungeonType, int chapterID, int chestPosition)
        {
            DungeonStarData dungeonStarData = null;
            string          compositeKey    = string.Format(COMPOSITE_KEY_TEMPLATE_STRING, dungeonType.ToString(), chapterID, chestPosition);

            CompositeKeyDungeonStarDataDictionary.TryGetValue(compositeKey, out dungeonStarData);
            return(dungeonStarData);
        }
Exemplo n.º 8
0
        // CONSTRUCTORS //

        public Dungeon(string name, DungeonType dungeonType, List <String> monsterTypes, int floors)
        {
            this.name         = name;
            this.dungeonType  = dungeonType;
            this.monsterTypes = monsterTypes;
            this.floors       = new DungeonFloor[floors];
            startLvl          = Program.Player.Stats.Level.Lvl;
        }
Exemplo n.º 9
0
    public Dungeon(ref DungeonType dungeonType, int level, int seed = 0x1DC5)
    {
        this.dungeonType = dungeonType;
        this.level       = level;
        this.seed        = seed;

        this.minSize = 0x0000;
        this.maxSize = 0x00FF;
    }
Exemplo n.º 10
0
        public DungeonSession CreateDungeonSession(int dungeonId, DungeonType dungeonType)
        {
            int            dungeonSessionId  = GetUniqueSessionId();
            int            dungeonInstanceId = GetMapInstanceId();
            DungeonSession dungeonSession    = new DungeonSession(dungeonSessionId, dungeonId, dungeonInstanceId, dungeonType);

            DungeonSessionList.Add(dungeonSessionId, dungeonSession);
            return(dungeonSession);
        }
        public DungeonSession(int sessionId, int dungeonId, int dungeonInstanceId, DungeonType dungeonType)
        {
            DungeonType       = dungeonType;
            SessionId         = sessionId;
            DungeonId         = dungeonId;
            DungeonInstanceId = dungeonInstanceId;
            DungeonMetadata dungeon = DungeonStorage.GetDungeonByDungeonId(dungeonId);

            DungeonMapIds  = dungeon.FieldIds;
            DungeonLobbyId = dungeon.LobbyFieldId;
        }
Exemplo n.º 12
0
        public void OpenDungeon(DungeonType dungeonType, int dungeonLevel)
        {
            var mainWindow = MainWindow.MIns;
            if (mainWindow == null)
                return;

            mainWindow.dungeon_attack_page.Visibility = Visibility.Visible;
            mainWindow.dungeon_type.Content = dungeonType.ToString();
            mainWindow.dungeon_level.Content = dungeonLevel;
            SetImageDungeon(dungeonType, mainWindow.dungeon_image);
        }
Exemplo n.º 13
0
 public UnityEngine.Object GetEntrancePrefabPath(DungeonType type)
 {
     if (type == DungeonType.Iron)
     {
         return(entrancePrefab0);
     }
     if (type == DungeonType.Cave)
     {
         return(entrancePrefab1);
     }
     return(entrancePrefab0);
 }
Exemplo n.º 14
0
        public int GetPlayerGainStarCountOfChapterOfDungeonType(DungeonType dungeonType, int chapterID)
        {
            int         playerGainStarCountOfChpaterOfDungeonType = 0;
            ChapterData chapterData   = ChapterData.GetChapterDataById(chapterID);
            List <int>  dungeonIDList = chapterData.GetChapterDungeonIDListOfDungeonType(dungeonType);
            DungeonInfo dungeonInfo   = null;

            for (int i = 0; i < dungeonIDList.Count; i++)
            {
                playerGainStarCountOfChpaterOfDungeonType += GetDungeonInfo(dungeonIDList[i]).star;
            }
            return(playerGainStarCountOfChpaterOfDungeonType);
        }
Exemplo n.º 15
0
        public void OpenCopyMapBtnClickHandler()
        {
            if (FunctionOpenProxy.instance.IsFunctionOpen(FunctionOpenType.Dungeon_SelectChapter_View))
            {
//                DungeonType lastSelectedDungeonType = Logic.Chapter.Model.ChapterProxy.instance.LastSelectedDungeonType;
//                if (lastSelectedDungeonType == DungeonType.Invalid)
//                    lastSelectedDungeonType = DungeonType.Easy;
//                int lastSelectedDungeonDataID = Logic.Dungeon.Model.DungeonProxy.instance.GetLastUnlockDungeonID(lastSelectedDungeonType);
//				FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectedDungeonDataID);
                DungeonType lastSelectPVEDungoenType = Dungeon.Model.DungeonProxy.instance.LastSelectPVEDungeonType;
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectPVEDungoenType);
            }
        }
Exemplo n.º 16
0
 protected override void OnInit()
 {
     _layerMaskToFootprint  = 0;
     _layerToFootprintTerra = Pathea.Layer.VFVoxelTerrain;
     _layerToFootprintMetal = -1;
     _nonTerClipIds         = _metalClipIds;
     if (Pathea.PeGameMgr.IsAdventure)
     {
         if (RandomDungenMgr.Instance != null && RandomDungenMgrData.dungeonBaseData != null && RandomDungenMgrData.InDungeon)
         {
             DungeonType dType = RandomDunGenUtil.GetDungeonType();
             if (dType == DungeonType.Iron || dType == DungeonType.Cave)
             {
                 _layerToFootprintTerra = -1;
                 _layerToFootprintMetal = Pathea.Layer.SceneStatic;
                 _nonTerClipIds         = _stoneClipIds;
             }
             //if(dType == DungeonType.Cave) {
             //	_layerToFootprintTerra = Pathea.Layer.SceneStatic;
             //	_layerToFootprintMetal = -1;
             //}
         }
     }
     else if (Pathea.PeGameMgr.IsStory)
     {
         if (Pathea.PeGameMgr.IsSingle || Pathea.PeGameMgr.IsTutorial)
         {
             if (Pathea.SingleGameStory.curType != Pathea.SingleGameStory.StoryScene.MainLand)
             {
                 _layerToFootprintTerra = -1;
                 _layerToFootprintMetal = Pathea.Layer.SceneStatic;
             }
         }
         if (Pathea.PeGameMgr.IsMulti)
         {
             if (PlayerNetwork.mainPlayer != null && PlayerNetwork.mainPlayer._curSceneId != (int)Pathea.SingleGameStory.StoryScene.MainLand)
             {
                 _layerToFootprintTerra = -1;
                 _layerToFootprintMetal = Pathea.Layer.SceneStatic;
             }
         }
     }
     if (_layerToFootprintTerra >= 0)
     {
         _layerMaskToFootprint |= (1 << _layerToFootprintTerra);
     }
     if (_layerToFootprintMetal >= 0)
     {
         _layerMaskToFootprint |= (1 << _layerToFootprintMetal);
     }
 }
Exemplo n.º 17
0
        public void OpenDungeon(DungeonType dungeonType, int dungeonLevel)
        {
            var mainWindow = MainWindow.MIns;

            if (mainWindow == null)
            {
                return;
            }

            mainWindow.dungeon_attack_page.Visibility = Visibility.Visible;
            mainWindow.dungeon_type.Content           = dungeonType.ToString();
            mainWindow.dungeon_level.Content          = dungeonLevel;
            SetImageDungeon(dungeonType, mainWindow.dungeon_image);
        }
Exemplo n.º 18
0
 public List <int> GetChapterDungeonIDListOfDungeonType(DungeonType dungeonType)
 {
     if (dungeonType == DungeonType.Easy)
     {
         return(easyDungeonIDList);
     }
     else if (dungeonType == DungeonType.Normal)
     {
         return(normalDungeonIDList);
     }
     else if (dungeonType == DungeonType.Hard)
     {
         return(hardDungeonIDList);
     }
     return(null);
 }
Exemplo n.º 19
0
        public static List <DungeonData> GetDungeonDataListByType(DungeonType dungeonType)
        {
            List <DungeonData> result             = new List <DungeonData>();
            List <DungeonData> allDungeonDataList = GetAllDungeonDataList();
            int         allDungeonDataCount       = allDungeonDataList.Count;
            DungeonData dungeonData = null;

            for (int i = 0; i < allDungeonDataCount; i++)
            {
                dungeonData = allDungeonDataList[i];
                if (dungeonData.dungeonType == dungeonType)
                {
                    result.Add(dungeonData);
                }
            }
            return(result);
        }
Exemplo n.º 20
0
 public DungeonBuilder(Vec2i chunkPos, Vec2i size, DungeonType type)
 {
     ChunkPosition  = chunkPos;
     Size           = size;
     TileSize       = Size * World.ChunkSize;
     Type           = type;
     DungeonObjects = new WorldObjectData[TileSize.x, TileSize.z];
     DungeonTiles   = new Tile[TileSize.x, TileSize.z];
     BASE_DIRT      = new int[World.ChunkSize, World.ChunkSize];
     for (int x = 0; x < World.ChunkSize; x++)
     {
         for (int z = 0; z < World.ChunkSize; z++)
         {
             BASE_DIRT[x, z] = Tile.DIRT.ID;
         }
     }
 }
Exemplo n.º 21
0
        private int AddShell(DungeonType dungeonType, int offset, byte[] shellData, int shellByteOffset)
        {
            DungeonShell shell = new DungeonShell();

            shell.DungeonType     = dungeonType;
            shell.RomPointer      = 0x122000 + offset;
            shell.Pointer         = Utilities.PCAddressToSnesByteArray(0x122000 + offset);
            shell.ShellData       = shellData;
            shell.ShellByteOffset = shellByteOffset;
            Shells.Add(shell);

            if (shellData != null)
            {
                return(offset + shellData.Length);
            }

            return(offset);
        }
Exemplo n.º 22
0
        public string GetDifficultyNameByDungeonType(DungeonType dungeonType)
        {
            string difficultyName = "";

            if (dungeonType == DungeonType.Easy)
            {
                difficultyName = Localization.Get("ui.dungeon_detail_view.easy_type");
            }
            else if (dungeonType == DungeonType.Normal)
            {
                difficultyName = Localization.Get("ui.dungeon_detail_view.normal_type");
            }
            else if (dungeonType == DungeonType.Hard)
            {
                difficultyName = Localization.Get("ui.dungeon_detail_view.hard_type");
            }
            return(difficultyName);
        }
Exemplo n.º 23
0
        /// <summary>
        /// Constructor containing items(didn't make it), schematic(didn't make it), gold and xp rewards.
        /// </summary>
        /// <param name="maxLevel"></param>
        /// <param name="minLevel"></param>
        /// <param name="averageLevel"></param>
        public Dungeon(int maxLevel, int minLevel, int averageLevel)
        {
            //Delete Dungeon
            started = DateTime.Now;
            expire  = started.AddSeconds(60);
            TimeSpan delta = expire - started;

            timeLeft = delta.Seconds;

            //Timed Dungeon
            reqTime = 100;

            items = new string[] { "Potion", "Light Sword", "Mail" };
            type  = (DungeonType)RndPicker.Rnd.Next(0, 3);

            if (type == DungeonType.Dragon)
            {
                dropAbleSchematic = BuildingType.ArcheryRange;
            }
            else if (type == DungeonType.Elemental)
            {
                dropAbleSchematic = BuildingType.Sanctum;
            }
            else if (type == DungeonType.Orc)
            {
                dropAbleSchematic = BuildingType.Barrack;
            }
            else
            {
                dropAbleSchematic = BuildingType.Storage;
            }

            level = RndPicker.Rnd.Next(minLevel - 2, maxLevel + 2);
            if (level < 1)
            {
                level = 1;
            }
            layerGold = (level * 10) + 30;
            layerXP   = (level * 5) + 5;
            layer     = 5;//(level / 5) + 1;

            goldReward = RndPicker.Rnd.Next((level * layer * 2 * 10), (level * layer * 2 * 10) + (averageLevel * 10));
            xPReward   = RndPicker.Rnd.Next(20 - level + layer + (int)((level * 0.5f) + (layer * 0.1f)), 20 + level + layer + (int)((level * 0.5f) + (layer * 0.1f)));
        }
Exemplo n.º 24
0
 public void Set(GoodsJumpType type, int id)
 {
     _type = type;
     _id   = id;
     if (type == GoodsJumpType.Jump_DailyDungeon)
     {
         titleText.text = string.Format(Localization.Get("ui.goodsJumpPathView.path" + (int)type), Localization.Get(ActivityData.ActivityDataDictionary[_id].name));
     }
     else if (type == GoodsJumpType.Jump_Dungeon)
     {
         DungeonInfo info = DungeonProxy.instance.GetDungeonInfo(id);
         if (info != null)
         {
             DungeonType dungeonType = info.dungeonData.dungeonType;
             string      difficult   = string.Empty;
             if (dungeonType == DungeonType.Easy)
             {
                 difficult = Localization.Get("ui.select_chapter_view.easy_type");
             }
             else if (dungeonType == DungeonType.Normal)
             {
                 difficult = Localization.Get("ui.select_chapter_view.normal_type");
             }
             else
             {
                 difficult = Localization.Get("ui.select_chapter_view.hard_type");
             }
             titleText.text = string.Format(Localization.Get("ui.goodsJumpPathView.path1"), difficult, Localization.Get(info.dungeonData.order_name), Localization.Get(info.dungeonData.name));
         }
         else
         {
             Debugger.LogError("dungeonInfo is not find ; id:" + id);
         }
     }
     else if (type == GoodsJumpType.Jump_BlackMarket)
     {
         titleText.text = string.Format(Localization.Get("ui.goodsJumpPathView.path8"), Localization.Get(BlackMarketData.GetBlackMarketTitleNameByType(_id)));
     }
     else
     {
         titleText.text = Localization.Get("ui.goodsJumpPathView.path" + (int)type);
     }
     SetButtonEnable(CheckButtonEnable());
 }
Exemplo n.º 25
0
        public Dictionary <int, DungeonInfo> GetDungeonInfoDictionaryByType(DungeonType type)
        {
            Dictionary <int, DungeonInfo> dic = null;

            switch (type)
            {
            case DungeonType.Easy:
                dic = EasyDungeonInfoDictionary;
                break;

            case DungeonType.Normal:
                dic = NormalDungeonInfoDictionary;
                break;

            case DungeonType.Hard:
                dic = HardDungeonInfoDictionary;
                break;
            }
            return(dic);
        }
Exemplo n.º 26
0
    /// <summary>
    /// This method is used to manage the current dungeon setting based on the level ID.
    /// </summary>
    public void ManageDungeonType() //TODO: make a good random dungeon Variation
    {
        if (currentLevelID > 0)
        {
            isFirstLevel = false;
        }

        if (currentLevelID == 2) // Sets dungeon type to rooms at 3 level
        {
            dungeonType = DungeonType.Rooms;
        }

        if (currentLevelID > 2)
        {
            dungeonType = DungeonType.Cavern;
        }

        if (currentLevelID == maxLevelOnThisStage)
        {
            dungeonType = DungeonType.BoosRoom;
        }
    }
Exemplo n.º 27
0
        public void Init(DungeonType dungeonType, List <string> monsterTypes, int floor)
        {
            RoomPlacementAlgorithm roomPlacementAlgo;

            switch (dungeonType)
            {
            case (DungeonType.RoomPlacement_s):
                roomPlacementAlgo = new RoomPlacementAlgorithm(this, monsterTypes);
                roomPlacementAlgo.GenerateDungeon(250, 15, floor);
                break;

            case (DungeonType.RoomPlacement_l):
                roomPlacementAlgo = new RoomPlacementAlgorithm(this, monsterTypes);
                roomPlacementAlgo.GenerateDungeon(500, 40, floor);
                break;

            default:
                roomPlacementAlgo = new RoomPlacementAlgorithm(this, monsterTypes);
                roomPlacementAlgo.GenerateDungeon(250, 15, floor);
                break;
            }
            patrolMaps = new PatrolMaps(100, 100, patrolPoints, this);
        }
Exemplo n.º 28
0
        public int GetLastUnlockDungeonID(DungeonType dungeonType)
        {
            int lastUnlockDungeonID = -1;

            switch (dungeonType)
            {
            case DungeonType.Easy:
                lastUnlockDungeonID = LastUnlockEasyDungeonID;
                break;

            case DungeonType.Normal:
                lastUnlockDungeonID = LastUnlockNormalDungeonID;
                break;

            case DungeonType.Hard:
                lastUnlockDungeonID = LastUnlockHardDungeonID;
                break;

            default:
                break;
            }
            return(lastUnlockDungeonID);
        }
Exemplo n.º 29
0
 public bool IsLock(DungeonType dungeonType)
 {
     if (dungeonType == DungeonType.Easy)
     {
         for (int i = 0, count = chapterData.easyDungeonIDList.Count; i < count; i++)
         {
             if (!DungeonProxy.instance.GetDungeonInfo(chapterData.easyDungeonIDList[i]).isLock)
             {
                 return(false);
             }
         }
         return(true);
     }
     else if (dungeonType == DungeonType.Normal)
     {
         for (int i = 0, count = chapterData.normalDungeonIDList.Count; i < count; i++)
         {
             if (!DungeonProxy.instance.GetDungeonInfo(chapterData.normalDungeonIDList[i]).isLock)
             {
                 return(false);
             }
         }
         return(true);
     }
     else if (dungeonType == DungeonType.Hard)
     {
         for (int i = 0, count = chapterData.hardDungeonIDList.Count; i < count; i++)
         {
             if (!DungeonProxy.instance.GetDungeonInfo(chapterData.hardDungeonIDList[i]).isLock)
             {
                 return(false);
             }
         }
         return(true);
     }
     return(true);
 }
Exemplo n.º 30
0
        private void SetImageDungeon(DungeonType dungeonType, Rectangle rect)
        {
            var imgUrl = "pack://application:,,,/Resources/Images/Dungeons/Npccamp_";

            switch (dungeonType)
            {
            case DungeonType.Forest:
                imgUrl += "woods";
                break;

            case DungeonType.Mountain:
                imgUrl += "mountains";
                break;

            case DungeonType.Hill:
                imgUrl += "hill";
                break;
            }

            imgUrl   += "_active.png";
            rect.Fill = new ImageBrush {
                ImageSource = new BitmapImage(new Uri(@imgUrl, UriKind.RelativeOrAbsolute))
            };
        }
Exemplo n.º 31
0
        public void QuitPveCallback()
        {
            DungeonData currentDungeonData      = FightProxy.instance.CurrentDungeonData;
            DungeonType lastSelectedDungeonType = Logic.Chapter.Model.ChapterProxy.instance.LastSelectedDungeonType;

            if (lastSelectedDungeonType == DungeonType.Invalid)
            {
                lastSelectedDungeonType = DungeonType.Easy;
            }
            int         lastSelectedDungeonDataID = Logic.Dungeon.Model.DungeonProxy.instance.GetLastUnlockDungeonID(lastSelectedDungeonType);
            DungeonData lastSelectDungeonData     = DungeonData.GetDungeonDataByID(lastSelectedDungeonDataID);

            switch (quitResultType)
            {
            case FightResultQuitType.Fight_Again:
                Logic.UI.DungeonDetail.Model.DungeonDetailProxy.instance.StartFight();
                break;

            case FightResultQuitType.Fight_Again_Map:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_Detail_View, currentDungeonData.dungeonID, true);
                break;

            case FightResultQuitType.Fight_Next_Dungeon:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_Detail_View, GetNextDungeon().dungeonData.dungeonID, true);
                break;

            case FightResultQuitType.Go_Equip:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Equipment_View);
                break;

            case FightResultQuitType.Go_Hero:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.RoleInfoView);
                break;

            case FightResultQuitType.Go_Map:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, currentDungeonData.dungeonID, true);
                break;

            case FightResultQuitType.Go_Player:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.PlayerInfoView);
                break;

            case FightResultQuitType.Go_Formation:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.PveEmbattleView);
                break;

            case FightResultQuitType.Go_Shop:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Shop_View);
                break;

            case FightResultQuitType.Go_MainView:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.MainView);
                break;

            case FightResultQuitType.GO_Boss_List:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Boss_List_View);
                break;
            }
        }
Exemplo n.º 32
0
        private void SetImageDungeon(DungeonType dungeonType, Rectangle rect)
        {
            var imgUrl = "pack://application:,,,/Resources/Images/Dungeons/Npccamp_";

            switch (dungeonType)
            {
                case DungeonType.Forest:
                    imgUrl += "woods";
                    break;
                case DungeonType.Mountain:
                    imgUrl += "mountains";
                    break;
                case DungeonType.Hill:
                    imgUrl += "hill";
                    break;
            }

            imgUrl += "_active.png";
            rect.Fill = new ImageBrush {ImageSource = new BitmapImage(new Uri(@imgUrl, UriKind.RelativeOrAbsolute))};
        }