コード例 #1
0
 void IncreaseNecessaryExp()
 {
     miko.GetExp(-necessaryExp);
     if (kamiAreaLv + hpLv + specialLv - 3 == 5)
     {
         necessaryExp = 150;
     }
     else if (kamiAreaLv + hpLv + specialLv - 3 == 15)
     {
         necessaryExp = 500;
     }
     else if (kamiAreaLv + hpLv + specialLv - 3 == 25)
     {
         necessaryExp = 1350;
     }
     else if (kamiAreaLv + hpLv + specialLv - 3 >= 50)
     {
         necessaryExp = 15000;
     }
     else
     {
         necessaryExp = (int)(necessaryExp * 1.1);
     }
     tExp.text = "必要神力: " + necessaryExp.ToString() + "P";
 }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     if (target != null)
     {
         if (!target.Stun)
         {
             if (!mikochan.Damaged && !mikochan.Invincible)
             {
                 rb.velocity = Vector2.zero;
                 mikochan.ChangeHp(-target.Attack);
                 knockBack.x = cc.offset.x > 0 ? -knockBackDir : knockBackDir;
                 rb.AddForce(knockBack, ForceMode2D.Impulse);
                 mikochan.Invincible = true;
                 mikochan.Damaged    = true;
                 mikochan.DoIEnumerator("Inv");
                 mikochan.DoIEnumerator("KnockBack");
             }
         }
         else if (mikochan.Squat)
         {
             mikochan.GetExp(target.Exp);
             target.ResetPos();
             target.gameObject.SetActive(false);
             target.ResetFlag = true;
             target           = null;
         }
     }
     TrapDamage();
 }