Ejemplo n.º 1
0
 private void Missed(MissType type, float pointsPercentage)
 {
     if (pointsPercentage > 0f && pointsPercentage <= 1)
     {
         StartCoroutine(ChangeToPct(pointsPercentage));
     }
     else
     {
         bar.fillAmount = pointsPercentage;
     }
 }
Ejemplo n.º 2
0
 public void Missed(MissType type)
 {
     if (type == MissType.NoObject)
     {
         TotalPoints -= 5;
     }
     else if (type == MissType.WrongDirection)
     {
         TotalPoints -= 10;
     }
     OnPointsChanged?.Invoke(TotalPoints);
     OnMissed?.Invoke(type, PointsPercentage);
     OnMissfeedback?.Play(Vector3.zero);
 }
Ejemplo n.º 3
0
    private void MakeText(MissType type)
    {
        GameObject ins = Instantiate(textPrefab, transform);

        if (type == MissType.NoObject)
        {
            int index = UnityEngine.Random.Range(0, missNoObj.Length);
            ins.GetComponent <PopUp>().Setup(missNoObj[index]);
        }
        else
        {
            int index = UnityEngine.Random.Range(0, missDir.Length);
            ins.GetComponent <PopUp>().Setup(missDir[index]);
        }
    }
Ejemplo n.º 4
0
 public MissedInfo(MissType type, int amount)
 {
     TypeMiss     = type;
     AmountMissed = amount;
 }
Ejemplo n.º 5
0
 public MissedInfo(MissType type)
 {
     TypeMiss = type;
 }
Ejemplo n.º 6
0
 private void OnMiss(MissType type, float points)
 {
     MakeText(type);
 }