Commit c3ad29e7 authored by gstuitje's avatar gstuitje
Browse files

Fixed Mime Mime miss hits.

parent 5875e0c7
...@@ -20,8 +20,8 @@ public class Key : MonoBehaviour { ...@@ -20,8 +20,8 @@ public class Key : MonoBehaviour {
transform.Translate(Vector3.down * speed * Time.deltaTime, Space.World); transform.Translate(Vector3.down * speed * Time.deltaTime, Space.World);
if(!isVisible()){ if(!isVisible()){
MimeMime.MissHit(GetComponent<Key>());
triggerManager.performBadHit(this.gameObject); triggerManager.performMissHit(this.gameObject);
} }
} }
......
...@@ -65,7 +65,6 @@ public class MimeMime : MonoBehaviour { ...@@ -65,7 +65,6 @@ public class MimeMime : MonoBehaviour {
public static void MissHit(Key key) public static void MissHit(Key key)
{ {
int addScore = (int)(key.points * FindObjectOfType<SpawnKeys>().playSpeed); int addScore = (int)(key.points * FindObjectOfType<SpawnKeys>().playSpeed);
addPlayerScore(addScore*0.2f);
misses++; misses++;
badCount++; badCount++;
Combo /= 2; Combo /= 2;
......
...@@ -246,7 +246,18 @@ public class TriggerManager : MonoBehaviour ...@@ -246,7 +246,18 @@ public class TriggerManager : MonoBehaviour
Destroy(currentKey); Destroy(currentKey);
AudioSource.PlayClipAtPoint(badNoise, transform.position); AudioSource.PlayClipAtPoint(badNoise, transform.position);
musicSpawner.volume = 0.3f; musicSpawner.volume = 0.5f;
}
public void performMissHit(GameObject currentKey)
{
MimeMime.MissHit(currentKey.GetComponent<Key>());
print("Miss");
Instantiate(badHit, currentKey.transform.position, currentKey.transform.rotation);
Destroy(currentKey);
AudioSource.PlayClipAtPoint(badNoise, transform.position);
musicSpawner.volume = 0.5f;
} }
public void semiBadHit(){ public void semiBadHit(){
...@@ -254,6 +265,5 @@ public class TriggerManager : MonoBehaviour ...@@ -254,6 +265,5 @@ public class TriggerManager : MonoBehaviour
Instantiate(badHit, (Vector2)badCollider.transform.position + badCollider.offset, Quaternion.identity); Instantiate(badHit, (Vector2)badCollider.transform.position + badCollider.offset, Quaternion.identity);
AudioSource.PlayClipAtPoint(badNoise, transform.position); AudioSource.PlayClipAtPoint(badNoise, transform.position);
musicSpawner.volume = 0.3f;
} }
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment