示例#1
0
    public void CreateDungeonEvents()
    {
        int value;

        foreach (DungeonProgress dp_ in DungeonData.Instance.dungeon_Progress)
        {
            dp = dp_;
            if (dp.isParty == true)
            {
                if (dp.p.dayIndex == 5) //보스일 경우 지정된 특별한 이벤트들 생성함.
                {
                    BattleEventDelegate[3]();
                }
                else if (dp.p.day >= 0) //보스가 아닌 일반..
                {
                    value = UnityEngine.Random.Range(0, 3);
                    BattleEventDelegate[value]();
                }
                else//Day가 -1 이니 탐색완료.
                {
                    dp.SetData(7);
                }
            }
        }
    }
示例#2
0
    public void Choice(int value)
    {
        bool result            = Random.Range(0, answer_1.Contains(type) ? 1 : 2) == 0 ? true : false;
        int  answer            = 0;
        int  dp_Evnet_Type_Num = 8;

        switch (type)
        {
        case 0:     //Left_Or_Right
            int day = DungeonData.Instance.day_Array[dp.p.dayIndex] / 2;
            dp.p.Day += result ? -day : day / 2;
            answer    = result ? 0 : 1;
            break;

        case 1:     //Lucky_Lake
            foreach (int k in dp.p.k)
            {
                UnitData.Instance.knights[k].Lucky_Lake();
            }
            answer = 2;
            break;

        case 2:     //Treasure_Chest
            if (value == 1)
            {
                answer = 5;
                break;
            }
            if (result)
            {
                dp.Reward += 100;
            }

            /*
             * else// 이건 미믹 전투화면이된다.
             *  {
             *      //dp_Evnet_Type_Num = 5;
             *  }
             */
            answer = result ? 3 : 4;
            break;

        case 3:     //Gamble
            break;

        default:
            break;
        }
        //표시
        result_Obj.SetActive(true);
        result_Obj.GetComponentInChildren <Text>().text = TextData.Instance.choice_Event_Result[answer];

        dp.SetData(dp_Evnet_Type_Num);

        GameController.Instance.EventCheck();
    }
示例#3
0
    public void EndBattle()
    {
        dp.SetData(8);

        //HP정보  Knight 에 저장
        foreach (KnightState ks in dp.p.knightStates)
        {
            ks.UpdateState();
        }

        sceneController.MoveToMain();
    }
示例#4
0
 private void SetNoneEvent()
 {
     dp.SetData(2);
 }
示例#5
0
 private void Create_Event_None()
 {
     dp.SetData(2);
 }