Esempio n. 1
0
 public void UseItem(int _id)
 {
     //paraPlayer = paraPlayer.GetComponent<ParameterPlayer>();
     //Debug.Log(paraPlayer);
     paraPlayer.ReadAll();
     if (paraPlayer == null)
     {
         return;
     }
     for (int i = 1; i < 5; i++)
     {
         for (int j = 0; j <= 5; j++)
         {
             if (_id == 4 * j + i)
             {
                 if (i == 1)
                 {
                     paraPlayer.AddDamage("DMG0", valueItem(_id) * 10);
                     paraPlayer.AddDamage("DMG1", valueItem(_id) * 10 + 10);
                     paraPlayer.AddDamage("DMG3", valueItem(_id) * 10 + 15);
                     paraPlayer.AddDamage("DMG5", valueItem(_id) * 10 + 20);
                 }
                 else if (i == 2)
                 {
                     paraPlayer.HPUP("HP", valueItem(_id) * 800);
                 }
                 else if (i == 3)
                 {
                     paraPlayer.HPUP("HP", valueItem(_id) * 300);
                 }
                 else
                 {
                     paraPlayer.HPUP("HP", valueItem(_id) * 100);
                 }
                 profilePlayer.ChangeProfile(i - 1, _id);
             }
         }
     }
     if (_id == 26)
     {
         paraPlayer.AddHP("HP", valueItem(_id) * 1000);
     }
     else if (_id == 25)
     {
         paraPlayer.AddExp(valueItem(_id) * 8000);
     }
     else
     {
         paraPlayer.AddDamage("DMG0", valueItem(_id) * 100);
         paraPlayer.AddDamage("DMG1", valueItem(_id) * 100 + 10);
         paraPlayer.AddDamage("DMG3", valueItem(_id) * 100 + 15);
         paraPlayer.AddDamage("DMG5", valueItem(_id) * 100 + 20);
         paraPlayer.HPUP("HP", valueItem(_id) * 1000);
     }
     //Debug.Log(valueItem(_id).ToString());
     noticeMain.SetText(noticeMain.text + "- Used " + line.name[_id] + "\n");
 }
Esempio n. 2
0
 private void GiveReward()
 {
     readStats.AddExp(earnexp);
     readStats.addScore(earnpoints);
 }