Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RhythmKata
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
13정준영
RhythmKata
Commits
f3910b09
Commit
f3910b09
authored
Nov 13, 2019
by
13정준영
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notehit
parent
1e35be9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
Note.cs
RhythmKata/Assets/Scripts/Core/Note.cs
+6
-2
No files found.
RhythmKata/Assets/Scripts/Core/Note.cs
View file @
f3910b09
...
...
@@ -28,9 +28,12 @@ abstract class Note
public
abstract
void
Judge
(
double
time
);
// TODO: Refactort this
private
static
readonly
float
NOTE_SHOW_TIMING
=
5
;
private
static
readonly
float
NOTE_HIDE_TIMING
=
-
2
;
public
void
Update
(
float
remainingTime
)
{
if
(
remainingTime
<
-
1
||
remainingTime
>
5
)
if
(
remainingTime
<
NOTE_HIDE_TIMING
||
remainingTime
>
NOTE_SHOW_TIMING
)
{
noteObject
.
gameObject
.
SetActive
(
false
);
Active
=
false
;
...
...
@@ -40,7 +43,8 @@ abstract class Note
Active
=
true
;
noteObject
.
gameObject
.
SetActive
(
true
);
}
noteObject
.
SetPosition
(
remainingTime
);
noteObject
.
SetPosition
(
remainingTime
/
NOTE_SHOW_TIMING
);
}
// factory method
...
...
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