示例#1
0
 public void EndRound()
 {
     if (HP_G <= 0)
     {
         GerlAnimator[0].SetTrigger("Die");
         int Gold_Lose = HP_Person.LVLPers * Random.Range(10, 30);
         if (HP_Person.Skills[11])
         {
             Gold_Lose      += ((Gold_Lose / 100) * (24 + HP_Person.LVL_Skill[11]));
             HP_Person.Gold += Gold_Lose;
         }
         else
         {
             HP_Person.Gold += Gold_Lose;
         }
         Gold.text = Gold_Lose.ToString();
         int Rubin_Lose = 0;
         HP_Person.Rubin     += Rubin_Lose;
         Rubin.text           = Rubin_Lose.ToString();
         HP_Person.PointBook += WordButtom.Point_now_Battel;
         Point.text           = WordButtom.Point_now_Battel.ToString();
         int EXP_lose = HP_Person.LVLPers * Random.Range(10, 20);
         HP_Person.NowXP += EXP_lose;
         Exp.text         = EXP_lose.ToString();
         //HP_Person.NowXP += 50;
         RoundPanel.SetActive(true);
         GameState     = false;
         EndRaund.text = "В этот раз Усакула победил!" + "\n" + "Попробуйте улучшить оружие или запомнить больше волшебных слов ;)";
         if (HP_Person.NowXP >= HP_Person.NextLVLXP)
         {
             NextLevel.text = "НОВЫЙ УРОВЕНЬ!";
         }
         RoundPanel.transform.DOMove(Lasttransform.position, 1f);
         HP_Person.NextLVL();
         HP_Person.SaveData();
     }
     if (HP_E <= 0)
     {
         EnyAnimator[HP_Person.NumberEnemy].SetTrigger("Die");
         int Gold_W = HP_Person.LVLPers * Random.Range(80, 100);
         if (HP_Person.Skills[11])
         {
             Gold_W         += ((Gold_W / 100) * (24 + HP_Person.LVL_Skill[11]));
             HP_Person.Gold += Gold_W;
         }
         else
         {
             HP_Person.Gold += Gold_W;
         }
         Gold.text = Gold_W.ToString();
         int Rubin_W = 0;
         int Shois   = Random.Range(0, 100);
         if (Shois <= 20)
         {
             Rubin_W = 1;
         }
         HP_Person.Rubin     += Rubin_W;
         Rubin.text           = Rubin_W.ToString();
         HP_Person.PointBook += WordButtom.Point_now_Battel;
         Point.text           = WordButtom.Point_now_Battel.ToString();
         int EXP_W = HP_Person.LVLPers * Random.Range(80, 110);
         HP_Person.NowXP += EXP_W;
         Exp.text         = EXP_W.ToString();
         //HP_Person.NowXP += 250;
         RoundPanel.SetActive(true);
         GameState     = false;
         EndRaund.text = "Вы победили! Так держать!";
         if (HP_Person.NowXP >= HP_Person.NextLVLXP)
         {
             NextLevel.text = "НОВЫЙ УРОВЕНЬ!";
         }
         RoundPanel.transform.DOMove(Lasttransform.position, 1f);
         HP_Person.NextLVL();
         HP_Person.SaveData();
     }
     //RoundPanel.SetActive(true);
     //GameState = false;
     //RoundPanel.transform.DOMove(Lasttransform.position, 1f);
     //HP_Person.NextLVL();
     //HP_Person.SaveData();
 }