Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
gstuitje
RingMaster
Commits
135c83d9
Commit
135c83d9
authored
Feb 14, 2019
by
gstuitje
Browse files
mime mime is balanced?
parent
0c3a4d9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
RingMaster/RingMaster/Assets/Scenes/MimeMime.unity
View file @
135c83d9
...
...
@@ -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
:
...
...
RingMaster/RingMaster/Assets/Scripts/MimeScripts/LevelManager.cs
View file @
135c83d9
...
...
@@ -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
/
4
000
;
float
levels
=
MimeMime
.
PlayerScore
/
3
000
;
GameManager
.
addToLevel
(
"Silas"
,
levels
);
SceneManager
.
LoadScene
(
"Daytime"
);
}
...
...
RingMaster/RingMaster/Assets/Scripts/MimeScripts/MimeMime.cs
View file @
135c83d9
...
...
@@ -7,7 +7,7 @@ public class MimeMime : MonoBehaviour {
private
static
float
playerScore
;
private
static
int
combo
;
private
static
floa
t
comboMultiplyer
;
private
static
in
t
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
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment