Beispiel #1
0
 public void DecBullet(PaceMatchScore score)
 {
     bulletNo -= 1;
     buff     += ScoreToBuff(score);
     Debug.Log("MATCH RANK: " + score);
     Debug.Log("Dec Bullet: " + bulletNo + " with current buff: " + buff);
     if (bulletNo <= 0)
     {
         StartCoroutine(battleManager.PlayCallBack(buff));
         Destroy(targetGO);
         foreach (PaceBullet bulletGO in bulletGOs)
         {
             Destroy(bulletGO);
         }
     }
 }
Beispiel #2
0
    float ScoreToBuff(PaceMatchScore score)
    {
        float buffDelta = 0f;

        switch (score)
        {
        case PaceMatchScore.PERFECT:
            buffDelta = 0.5f;
            break;

        case PaceMatchScore.GOOD:
            buffDelta = 0.2f;
            break;

        case PaceMatchScore.NORMAL:
            buffDelta = 0f;
            break;

        case PaceMatchScore.MISS:
            buffDelta = -0.1f;
            break;
        }
        return(buffDelta);
    }