Commit 6aed7208 authored by mmaluschnig's avatar mmaluschnig
Browse files

Merge branch 'master' of https://altitude.otago.ac.nz/gstuitje/ringmaster

* 'master' of https://altitude.otago.ac.nz/gstuitje/ringmaster:
  Fixed Mime Mime miss hits.
parents 3cf552ef c3ad29e7
......@@ -20,8 +20,8 @@ public class Key : MonoBehaviour {
transform.Translate(Vector3.down * speed * Time.deltaTime, Space.World);
if(!isVisible()){
MimeMime.MissHit(GetComponent<Key>());
triggerManager.performBadHit(this.gameObject);
triggerManager.performMissHit(this.gameObject);
}
}
......
......@@ -65,7 +65,6 @@ public class MimeMime : MonoBehaviour {
public static void MissHit(Key key)
{
int addScore = (int)(key.points * FindObjectOfType<SpawnKeys>().playSpeed);
addPlayerScore(addScore*0.2f);
misses++;
badCount++;
Combo /= 2;
......
......@@ -246,7 +246,18 @@ public class TriggerManager : MonoBehaviour
Destroy(currentKey);
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(){
......@@ -254,6 +265,5 @@ public class TriggerManager : MonoBehaviour
Instantiate(badHit, (Vector2)badCollider.transform.position + badCollider.offset, Quaternion.identity);
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