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
c3ad29e7
Commit
c3ad29e7
authored
Feb 14, 2019
by
gstuitje
Browse files
Fixed Mime Mime miss hits.
parent
5875e0c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
RingMaster/RingMaster/Assets/Scripts/MimeScripts/Key.cs
View file @
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
.
perform
Bad
Hit
(
this
.
gameObject
);
triggerManager
.
perform
Miss
Hit
(
this
.
gameObject
);
}
}
...
...
RingMaster/RingMaster/Assets/Scripts/MimeScripts/MimeMime.cs
View file @
c3ad29e7
...
...
@@ -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
;
...
...
RingMaster/RingMaster/Assets/Scripts/MimeScripts/TriggerManager.cs
View file @
c3ad29e7
...
...
@@ -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
Write
Preview
Markdown
is supported
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