Пример #1
0
    public void StartBattle()
    {
        Debug.Log("Hit the Trigger............................... Trigger");

        List <Classes.Enamy> EnamyList = new List <Classes.Enamy>();

        if (area == Areas.area1)
        {
            for (int i = 0; i < clas.Enamies.Count; i++)
            {
                //  if(clas.Enamies[i].classType == Classes.TypeClass.normal && clas.Enamies[i].Level <= LevelLimit)
                if (clas.Enamies[i].classType == Classes.TypeClass.normal)
                {
                    EnamyList.Add(clas.Enamies[i]);
                    Debug.Log("added enamy");
                }
            }
            Debug.Log(EnamyList.Count);
            int enami = Random.Range(0, EnamyList.Count);
            Debug.Log(EnamyList.Count + "number" + enami + EnamyList[enami].Name);

            int enamyLv = Random.Range(LevelLimit - 3, LevelLimit);
            EnamyList[enami].Level = enamyLv;
            battleEvent.StartBattle(EnamyList[enami]);
        }
    }
Пример #2
0
 // .....................................................................           choose type
 // happens after the talk text
 public void DoType()
 {
     if (npc == Npctype.StoreClerk)
     {
         ChatPannel.gameObject.SetActive(false);
         StoreMenuPannel.gameObject.SetActive(true);
         ConstructStoreSlots();
     }
     else if (npc == Npctype.Crafter)
     {
         ChatPannel.gameObject.SetActive(false);
         CraftPannel.gameObject.SetActive(true);
         ConstructCraftSlots();
     }
     else if (npc == Npctype.commonNpc)
     {
         if (currentChosenItem > 0)
         {
             GiveQuestItem();
         }
         // talkLines = talkLines2;
         EndNpcEvent();
         Debug.Log("did the event to turn it off");
     }
     else if (npc == Npctype.QuestGiver)
     {
         if (inventory.inventory.Contains(items.items[QuestGiverItemId]))
         {
             return;
         }
         // ChatPannel.gameObject.SetActive(false);
         GiveQuestItem();
         //  talkLines = talkLines2;
         EndNpcEvent();
     }
     else if (npc == Npctype.BossEvent)
     {
         ChatPannel.gameObject.SetActive(false);
         battleM.StartBattle(clas.Enamies[BossEnamyIndexId]);
         GiveQuestItem();
         EndNpcEvent();
     }
 }