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
c11facf8
Commit
c11facf8
authored
7 years ago
by
16이상민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified judge counting logic
Modified deactivate logic
parent
0868bc71
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
33 deletions
+50
-33
NoteJudger.cs
Assets/JudgeModule/NoteJudger.cs
+2
-0
NoteManager.cs
Assets/JudgeModule/NoteManager.cs
+6
-1
InGame.unity
Assets/Scene/InGame.unity
+15
-17
AllSceneManager.cs
Assets/Script/AllSceneManager.cs
+12
-0
Controller.cs
Assets/Script/Controller.cs
+14
-15
Note.cs
Assets/Script/Note.cs
+1
-0
No files found.
Assets/JudgeModule/NoteJudger.cs
View file @
c11facf8
...
...
@@ -70,6 +70,8 @@ namespace JudgeModule
judgeText
.
SetActive
(
true
);
judgeText
.
GetComponent
<
Text
>().
text
=
judge
.
Name
;
judgeText
.
GetComponent
<
Text
>().
color
=
judge
.
Color
;
Debug
.
Log
(
"SetJudge: "
+
AllSceneManager
.
TotalJudge
);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Assets/JudgeModule/NoteManager.cs
View file @
c11facf8
...
...
@@ -146,7 +146,8 @@ namespace JudgeModule
{
var
controllers
=
enables
[
name
].
ToArray
();
foreach
(
var
c
in
controllers
)
if
(
initialPos
.
x
-
c
.
EndPosition
(
ScrollSpeed
)
>
Judge
.
BAD
.
TimingRange
(
c
.
Instance
))
if
(!
c
.
Instance
.
Activated
&&
initialPos
.
x
-
c
.
StartPosition
()
>
Judge
.
BAD
.
TimingRange
(
c
.
Instance
))
{
NoteJudger
.
SetJudge
(
Judge
.
MISS
,
judgetext
);
c
.
Deactivate
(
deactives
.
transform
);
...
...
@@ -241,8 +242,12 @@ namespace JudgeModule
controller
.
gameObject
.
SetActive
(
true
);
if
(
note
.
IsLong
)
{
note
.
TotalCount
=
(
int
)(
note
.
Length
/
MsPerBeat
);
StretchLongNote
(
controller
);
}
}
private
void
StretchLongNote
(
Controller
controller
)
{
...
...
This diff is collapsed.
Click to expand it.
Assets/Scene/InGame.unity
View file @
c11facf8
...
...
@@ -88,7 +88,6 @@ LightmapSettings:
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
...
...
@@ -137,7 +136,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 36226165}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y:
0
, z: 0}
m_LocalPosition: {x: 0, y:
-1
, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 785996772}
...
...
@@ -536,7 +535,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 295245169}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y:
0
, z: 0}
m_LocalPosition: {x: 0, y:
-75
, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1152155867}
...
...
@@ -1624,8 +1623,8 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 765048384}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x:
0, y: 0
, z: 0}
m_LocalScale: {x:
0, y: 0, z: 0
}
m_LocalPosition: {x:
523, y: 294
, z: 0}
m_LocalScale: {x:
1, y: 1, z: 1
}
m_Children:
- {fileID: 1073141667}
- {fileID: 1173591428}
...
...
@@ -1983,7 +1982,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1073141666}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y:
0
, z: 0}
m_LocalPosition: {x: 0, y:
294
, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 785996772}
...
...
@@ -2149,7 +2148,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1152155866}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y:
-9
0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 295245170}
...
...
@@ -2320,7 +2319,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1173591427}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y:
0
, z: 0}
m_LocalPosition: {x: 0, y:
-94
, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1665813939}
...
...
@@ -2516,7 +2515,6 @@ Camera:
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
...
...
@@ -2621,7 +2619,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1299260532}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y:
0
, z: 0}
m_LocalPosition: {x: 0, y:
-151
, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 785996772}
...
...
@@ -2949,7 +2947,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1463464316}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x:
0
, y: 0, z: 0}
m_LocalPosition: {x:
-486.5
, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 295245170}
...
...
@@ -3225,7 +3223,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1669651589}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x:
0
, y: 0, z: 0}
m_LocalPosition: {x:
488.5
, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 295245170}
...
...
@@ -3260,7 +3258,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1681188542}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y:
0
, z: 0}
m_LocalPosition: {x: 0, y:
-101
, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 785996772}
...
...
@@ -3603,7 +3601,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1852280156}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y:
0
, z: 0}
m_LocalPosition: {x: 0, y:
-51
, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 785996772}
...
...
@@ -3837,7 +3835,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2001722606}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x:
0
, y: 0, z: 0}
m_LocalPosition: {x:
-1.5
, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 791052775}
...
...
@@ -3965,9 +3963,9 @@ MeshCollider:
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion:
3
serializedVersion:
2
m_Convex: 0
m_
CookingOptions: 14
m_
InflateMesh: 0
m_SkinWidth: 0.01
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &2093461956
...
...
This diff is collapsed.
Click to expand it.
Assets/Script/AllSceneManager.cs
View file @
c11facf8
...
...
@@ -17,6 +17,18 @@ public static class AllSceneManager
{
Judge
.
JudgeList
[
3
],
0
},
};
public
static
int
TotalJudge
{
get
{
int
sum
=
0
;
foreach
(
var
x
in
Judge
.
JudgeList
)
sum
+=
JudgeCount
[
x
];
return
sum
;
}
}
public
static
int
Combo
{
get
...
...
This diff is collapsed.
Click to expand it.
Assets/Script/Controller.cs
View file @
c11facf8
using
System.Collections.Generic
;
using
JudgeModule
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.UI
;
...
...
@@ -12,20 +13,6 @@ public class Controller : MonoBehaviour
private
readonly
float
minAlpha
=
0.3f
;
private
readonly
float
maxAlpha
=
0.7f
;
// Update is called once per frame
void
Update
()
{
if
(
transform
.
parent
.
gameObject
.
name
==
"Deactives"
)
{
foreach
(
Image
img
in
GetComponentsInChildren
<
Image
>())
{
Color
tmp
=
img
.
color
;
tmp
.
a
=
0f
;
img
.
color
=
tmp
+
new
Color
(
0
,
0
,
0
,
minAlpha
);
}
}
}
public
void
Deactivate
(
Transform
deactives
)
{
Instance
.
Activated
=
false
;
...
...
@@ -40,6 +27,13 @@ public class Controller : MonoBehaviour
transform
.
SetParent
(
deactives
);
disables
.
Add
(
this
);
enables
.
Remove
(
this
);
AllSceneManager
.
JudgeCount
[
Judge
.
MISS
]
+=
(
Instance
.
TotalCount
-
Instance
.
JudgeCount
);
if
(
Instance
.
IsLong
)
++
AllSceneManager
.
JudgeCount
[
Judge
.
MISS
];
Debug
.
Log
(
"Deactivate: "
+
AllSceneManager
.
TotalJudge
);
}
public
float
EndPosition
(
float
ScrollSpeed
)
...
...
@@ -47,4 +41,9 @@ public class Controller : MonoBehaviour
return
transform
.
position
.
x
+
(
Instance
.
EndTiming
-
Instance
.
StartTiming
)
*
ScrollSpeed
;
}
public
float
StartPosition
()
{
return
transform
.
position
.
x
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Assets/Script/Note.cs
View file @
c11facf8
...
...
@@ -3,6 +3,7 @@
public
Controller
Component
=
null
;
public
int
JudgeCount
;
public
int
TotalCount
;
public
float
StartTiming
{
get
;
private
set
;
}
public
float
EndTiming
{
get
;
private
set
;
}
...
...
This diff is collapsed.
Click to expand it.
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