Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
ButtonPusher
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Button Pusher
ButtonPusher
Commits
d99b97ff
Commit
d99b97ff
authored
Mar 01, 2018
by
16이상민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add combo text
parent
5c6b284f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
20 deletions
+105
-20
NoteJudger.cs
Assets/JudgeModule/NoteJudger.cs
+18
-8
NoteManager.cs
Assets/JudgeModule/NoteManager.cs
+4
-2
InGame.unity
Assets/Scene/InGame.unity
+77
-1
InGameManager.cs
Assets/Script/InGameManager.cs
+4
-1
JudgeTextManager.cs
Assets/Script/JudgeTextManager.cs
+0
-6
NoteJudgerTests.cs
Assets/Script/Tests/NoteJudgerTests.cs
+1
-1
TrackManager.cs
Assets/Script/TrackManager.cs
+1
-1
No files found.
Assets/JudgeModule/NoteJudger.cs
View file @
d99b97ff
...
...
@@ -10,7 +10,8 @@ namespace JudgeModule
private
Transform
deactives
;
private
Action
EndGame
;
private
GameObject
judgeText
,
firework
;
firework
,
combo
;
private
JudgeTextManager
judgetextmanager
;
private
MotionGageManager
guage
;
...
...
@@ -19,6 +20,7 @@ namespace JudgeModule
deactives
=
obj
[
"deactives"
].
transform
;
judgeText
=
obj
[
"judgetext"
];
firework
=
obj
[
"firework"
];
combo
=
obj
[
"combo"
];
EndGame
=
endgame
;
judgetextmanager
=
judgeText
.
GetComponent
<
JudgeTextManager
>();
...
...
@@ -28,7 +30,7 @@ namespace JudgeModule
public
void
WrongNoteProc
(
Note
note
)
{
SetJudge
(
Judge
.
MISS
,
judgeText
,
firework
);
SetJudge
(
Judge
.
MISS
,
judgeText
,
firework
,
combo
);
note
.
Component
.
Deactivate
(
deactives
.
transform
);
if
(!(
note
is
MotionNote
))
...
...
@@ -39,7 +41,7 @@ namespace JudgeModule
{
var
judge
=
Judge
.
TestJudge
(
note
,
timing
);
SetJudge
(
judge
,
judgeText
,
firework
);
SetJudge
(
judge
,
judgeText
,
firework
,
combo
);
judgetextmanager
.
Register
(
note
);
Debug
.
Log
(
"Entered: "
+
timing
+
", Judge: "
+
judge
.
Name
);
...
...
@@ -64,7 +66,7 @@ namespace JudgeModule
if
(
Judge
.
IsNoteProgress
(
note
,
timing
,
interval
))
{
Debug
.
Log
(
"Continuing: "
+
timing
);
SetJudge
(
Judge
.
Perfect
,
judgeText
,
firework
);
SetJudge
(
Judge
.
Perfect
,
judgeText
,
firework
,
combo
);
judgetextmanager
.
Register
(
note
);
++
note
.
JudgeCount
;
}
...
...
@@ -73,7 +75,7 @@ namespace JudgeModule
public
void
CorrectlyStoppedNoteProc
(
Note
note
,
float
timing
)
{
guage
.
ResetGuage
();
SetJudge
(
Judge
.
TestJudge
(
note
,
timing
,
true
),
judgeText
,
firework
);
SetJudge
(
Judge
.
TestJudge
(
note
,
timing
,
true
),
judgeText
,
firework
,
combo
);
judgetextmanager
.
Register
(
note
);
note
.
Component
.
Deactivate
(
deactives
.
transform
);
judgetextmanager
.
UnRegister
();
...
...
@@ -82,25 +84,33 @@ namespace JudgeModule
public
void
IncorrectlyStoppedNoteProc
(
Note
note
)
{
guage
.
ResetGuage
();
SetJudge
(
Judge
.
MISS
,
judgeText
,
firework
);
SetJudge
(
Judge
.
MISS
,
judgeText
,
firework
,
combo
);
judgetextmanager
.
Register
(
note
);
note
.
Component
.
Deactivate
(
deactives
.
transform
,
false
);
judgetextmanager
.
UnRegister
();
}
public
static
void
SetJudge
(
Judge
judge
,
GameObject
judgeText
,
GameObject
firework
)
public
static
void
SetJudge
(
Judge
judge
,
GameObject
judgeText
,
GameObject
firework
,
GameObject
combo
)
{
AllSceneManager
.
Combo
=
judge
.
IsBreak
?
0
:
AllSceneManager
.
Combo
+
1
;
AllSceneManager
.
Score
+=
judge
.
Score
;
AllSceneManager
.
JudgeCount
[
judge
]++;
if
(
AllSceneManager
.
Combo
>
0
&&
AllSceneManager
.
Combo
%
4
==
0
)
AllSceneManager
.
Combo
%
10
==
0
)
{
firework
.
GetComponent
<
FireworkManager
>().
timeout
+=
2
;
firework
.
SetActive
(
true
);
}
if
(
AllSceneManager
.
Combo
>
1
)
{
combo
.
GetComponent
<
Text
>().
text
=
AllSceneManager
.
Combo
.
ToString
();
combo
.
SetActive
(
true
);
}
else
if
(
AllSceneManager
.
Combo
==
0
)
combo
.
SetActive
(
false
);
judgeText
.
SetActive
(
false
);
judgeText
.
SetActive
(
true
);
judgeText
.
GetComponent
<
Text
>().
text
=
judge
.
Name
;
...
...
Assets/JudgeModule/NoteManager.cs
View file @
d99b97ff
...
...
@@ -13,7 +13,8 @@ namespace JudgeModule
appear
,
disappear
,
judgetext
,
firework
;
firework
,
combo
;
private
JudgeTextManager
judgetextmanager
;
...
...
@@ -104,6 +105,7 @@ namespace JudgeModule
disappear
=
gameObjects
[
"disappear"
];
judgetext
=
gameObjects
[
"judgetext"
];
firework
=
gameObjects
[
"firework"
];
combo
=
gameObjects
[
"combo"
];
judgetextmanager
=
judgetext
.
GetComponent
<
JudgeTextManager
>();
...
...
@@ -156,7 +158,7 @@ namespace JudgeModule
!
judgetextmanager
.
IsRegistered
(
c
.
Instance
)
&&
initialPos
.
x
-
c
.
StartPosition
()
>
Judge
.
BAD
.
TimingRange
(
c
.
Instance
))
{
NoteJudger
.
SetJudge
(
Judge
.
MISS
,
judgetext
,
firework
);
NoteJudger
.
SetJudge
(
Judge
.
MISS
,
judgetext
,
firework
,
combo
);
judgetextmanager
.
Register
(
c
.
Instance
);
c
.
Deactivate
(
deactives
.
transform
,
!
c
.
Instance
.
IsLong
);
}
...
...
Assets/Scene/InGame.unity
View file @
d99b97ff
...
...
@@ -1083,6 +1083,80 @@ RectTransform:
Transform
:
m_PrefabParentObject
:
{
fileID
:
400004
,
guid
:
4428a4d47b3582c4b90ee7163c0223da
,
type
:
3
}
m_PrefabInternal
:
{
fileID
:
1166755151
}
---
!u!1
&616344850
GameObject
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
serializedVersion
:
5
m_Component
:
-
component
:
{
fileID
:
616344851
}
-
component
:
{
fileID
:
616344854
}
-
component
:
{
fileID
:
616344853
}
m_Layer
:
5
m_Name
:
Combo
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!224
&616344851
RectTransform
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
616344850
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
1152155867
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
-14
}
m_SizeDelta
:
{
x
:
160
,
y
:
30
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&616344853
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
616344850
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
708705254
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_RaycastTarget
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData
:
m_Font
:
{
fileID
:
10102
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
m_FontSize
:
20
m_FontStyle
:
0
m_BestFit
:
0
m_MinSize
:
2
m_MaxSize
:
40
m_Alignment
:
4
m_AlignByGeometry
:
0
m_RichText
:
1
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
0
---
!u!222
&616344854
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
616344850
}
---
!u!4
&626936879
stripped
Transform
:
m_PrefabParentObject
:
{
fileID
:
400004
,
guid
:
4428a4d47b3582c4b90ee7163c0223da
,
type
:
3
}
...
...
@@ -2152,7 +2226,8 @@ RectTransform:
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Children
:
-
{
fileID
:
616344851
}
m_Father
:
{
fileID
:
295245170
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
@@ -2436,6 +2511,7 @@ MonoBehaviour:
m_EditorClassIdentifier
:
FireworkFX_1
:
{
fileID
:
1359478573
}
FireworkFX_2
:
{
fileID
:
1432184524
}
timeout
:
0
---
!u!1
&1199323771
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Script/InGameManager.cs
View file @
d99b97ff
...
...
@@ -71,6 +71,8 @@ public class InGameManager : MonoBehaviour
input
=
GetComponent
<
InputManager
>();
var
firework
=
GameObject
.
Find
(
"Firework"
);
firework
.
SetActive
(
false
);
var
combo
=
GameObject
.
Find
(
"Combo"
);
combo
.
SetActive
(
false
);
motionSampleDisplayPrefab
=
Resources
.
Load
(
"Motion Sample Display"
)
as
GameObject
;
...
...
@@ -87,7 +89,8 @@ public class InGameManager : MonoBehaviour
{
"judgetext"
,
judgetext
},
{
"sample"
,
motionSampleDisplayPrefab
},
{
"guage"
,
GameObject
.
Find
(
"Motion Guage"
)
},
{
"firework"
,
firework
}
{
"firework"
,
firework
},
{
"combo"
,
combo
}
});
}
...
...
Assets/Script/JudgeTextManager.cs
View file @
d99b97ff
...
...
@@ -4,16 +4,10 @@ using UnityEngine.UI;
public
class
JudgeTextManager
:
MonoBehaviour
{
private
float
start
;
private
Text
text
;
private
NoteType
type
;
private
float
startTiming
,
endTiming
;
private
void
Start
()
{
text
=
gameObject
.
GetComponent
<
Text
>();
}
private
void
OnEnable
()
{
start
=
Time
.
time
;
...
...
Assets/Script/Tests/NoteJudgerTests.cs
View file @
d99b97ff
...
...
@@ -28,7 +28,7 @@ public class NoteJudgerTests
{
yield
return
null
;
NoteJudger
.
SetJudge
(
x
,
settings
.
judge
,
null
);
NoteJudger
.
SetJudge
(
x
,
settings
.
judge
,
null
,
null
);
if
(
text
.
text
==
x
.
Name
&&
text
.
color
==
x
.
Color
)
...
...
Assets/Script/TrackManager.cs
View file @
d99b97ff
...
...
@@ -54,7 +54,7 @@ public class TrackManager : MonoBehaviour
TrackBrowse
();
}
// Update is called once per frame
void
Update
()
{
...
...
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