Commit 135c83d9 authored by gstuitje's avatar gstuitje
Browse files

mime mime is balanced?

parent 0c3a4d9b
......@@ -3911,7 +3911,7 @@ BoxCollider2D:
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.9, y: 1}
m_Size: {x: 0.9, y: 1.39}
m_EdgeRadius: 0
--- !u!1 &1795598300
GameObject:
......
......@@ -9,6 +9,7 @@ public class LevelManager : MonoBehaviour {
public Text score;
public Text combo;
public Text multi;
public GameObject exitPanel;
public Text exitText;
......@@ -27,6 +28,7 @@ public class LevelManager : MonoBehaviour {
private void FixedUpdate() {
score.text = "Score: " + (int)MimeMime.PlayerScore;
combo.text = "Combo: " + MimeMime.Combo;
multi.text = "Multiplier: " + MimeMime.getMultiplyer();
exitText.text = "Exit in " + ((int)(exitTime - Time.time + 0.98f)).ToString();
......@@ -39,7 +41,7 @@ public class LevelManager : MonoBehaviour {
}
if (Time.time > exitTime){
float levels = MimeMime.PlayerScore / 4000;
float levels = MimeMime.PlayerScore / 3000;
GameManager.addToLevel("Silas", levels);
SceneManager.LoadScene("Daytime");
}
......
......@@ -7,7 +7,7 @@ public class MimeMime : MonoBehaviour {
private static float playerScore;
private static int combo;
private static float comboMultiplyer;
private static int comboMultiplyer = 1;
private static int totalNotes;
private static int perfectHits;
......@@ -21,7 +21,7 @@ public class MimeMime : MonoBehaviour {
public static void resetScore() {
playerScore = 0;
combo = 0;
comboMultiplyer = 1;
totalNotes = 0;
perfectHits = 0;
goodHits = 0;
......@@ -36,8 +36,9 @@ public class MimeMime : MonoBehaviour {
int addScore = (int)(key.points * FindObjectOfType<SpawnKeys>().playSpeed);
addPlayerScore(addScore);
perfectHits++;
Combo += 2;
updateMultiplyer();
Combo += 1;
}
public static void GoodHit(Key key)
......@@ -45,7 +46,9 @@ public class MimeMime : MonoBehaviour {
int addScore = (int)(key.points * FindObjectOfType<SpawnKeys>().playSpeed);
addPlayerScore(addScore*0.8f);
goodHits++;
combo += 1;
updateMultiplyer();
}
public static void BadHit(Key key)
......@@ -54,8 +57,9 @@ public class MimeMime : MonoBehaviour {
addPlayerScore(addScore*0.4f);
badHits++;
badCount++;
Combo = (int)(combo / 1.25);
updateMultiplyer();
Combo -= badCount;
}
public static void MissHit(Key key)
......@@ -64,27 +68,14 @@ public class MimeMime : MonoBehaviour {
addPlayerScore(addScore*0.2f);
misses++;
badCount++;
Combo /= 2;
updateMultiplyer();
Combo -= badCount;
}
public static int Combo {
set {
if(value < 0) {
combo = value;
} else {
if(value > 80) {
badCount = 1;
}else if(value > 40) {
badCount = 1;
}else if(value > 20) {
badCount = 1;
}else if(value > 10) {
badCount = 1;
}
combo = value;
}
combo = value;
if (combo < 0) combo = 0;
}
get { return combo; }
......@@ -103,8 +94,15 @@ public class MimeMime : MonoBehaviour {
private static void updateMultiplyer() {
totalNotes++;
comboMultiplyer = (float)combo/totalNotes + 1;
comboMultiplyer = (combo / 10) + 1;
if(comboMultiplyer >= 5){
comboMultiplyer = 4;
}
print("Multi: " + comboMultiplyer);
}
public static int getMultiplyer(){
return comboMultiplyer;
}
}
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