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
e478b624
Commit
e478b624
authored
Nov 05, 2019
by
catdog
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NoteObject의 NoteHit 구현
parent
7ed14ee0
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23760 additions
and
11 deletions
+23760
-11
HitEffects.meta
RhythmKata/Assets/Prefabs/HitEffects.meta
+8
-0
Hit.prefab
RhythmKata/Assets/Prefabs/HitEffects/Hit.prefab
+14254
-0
Hit.prefab.meta
RhythmKata/Assets/Prefabs/HitEffects/Hit.prefab.meta
+7
-0
Perfect.prefab
RhythmKata/Assets/Prefabs/HitEffects/Perfect.prefab
+9464
-0
Perfect.prefab.meta
RhythmKata/Assets/Prefabs/HitEffects/Perfect.prefab.meta
+7
-0
Note.cs
RhythmKata/Assets/Scripts/Core/Note.cs
+1
-1
ForwardNoteObject.cs
RhythmKata/Assets/Scripts/ForwardNoteObject.cs
+4
-1
GameManager.cs
RhythmKata/Assets/Scripts/GameManager.cs
+1
-1
IngameUIManager.cs
RhythmKata/Assets/Scripts/IngameUIManager.cs
+1
-3
NoteObject.cs
RhythmKata/Assets/Scripts/NoteObject.cs
+10
-5
PlayEngine.cs
RhythmKata/Assets/Scripts/PlayEngine.cs
+3
-0
No files found.
RhythmKata/Assets/Prefabs/HitEffects.meta
0 → 100644
View file @
e478b624
fileFormatVersion: 2
guid: b91d9e17939dbb54ca7c770b6ede3001
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
RhythmKata/Assets/Prefabs/HitEffects/Hit.prefab
0 → 100644
View file @
e478b624
This diff is collapsed.
Click to expand it.
RhythmKata/Assets/Prefabs/HitEffects/Hit.prefab.meta
0 → 100644
View file @
e478b624
fileFormatVersion: 2
guid: e640eeafa4d7b8645b26c885d7eba308
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
RhythmKata/Assets/Prefabs/HitEffects/Perfect.prefab
0 → 100644
View file @
e478b624
This diff is collapsed.
Click to expand it.
RhythmKata/Assets/Prefabs/HitEffects/Perfect.prefab.meta
0 → 100644
View file @
e478b624
fileFormatVersion: 2
guid: 39e07a022f545624db4f9f7a8480a8d3
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
RhythmKata/Assets/Scripts/Core/Note.cs
View file @
e478b624
...
...
@@ -100,7 +100,7 @@ class ForwardNote : Note
protected
override
void
FromBmsNum
(
string
num
)
{
Debug
.
Log
(
num
);
//
Debug.Log(num);
// since 00 is used for empty notes, 1 ~ Z is valid range
x
=
charToCoord
(
num
[
0
])
/
35.0f
;
y
=
charToCoord
(
num
[
1
])
/
35.0f
;
...
...
RhythmKata/Assets/Scripts/ForwardNoteObject.cs
View file @
e478b624
...
...
@@ -44,6 +44,9 @@ public class ForwardNoteObject : NoteObject
}
private
void
Start
()
{
NoteHit
(
NoteHitType
.
PERFECT
);
Debug
.
Log
(
"A"
);
}
private
void
OnDisable
()
...
...
@@ -67,7 +70,7 @@ public class ForwardNoteObject : NoteObject
public
override
void
NoteHit
(
NoteHitType
type
)
{
//OnNoteHit(NoteHitType.PERFECT, 300
);
base
.
NoteHit
(
type
);
}
public
override
void
SetPosition
(
float
remainedTime
)
...
...
RhythmKata/Assets/Scripts/GameManager.cs
View file @
e478b624
...
...
@@ -14,7 +14,7 @@ public class GameManager : MonoBehaviour
private
void
Start
()
{
NoteObject
.
OnNoteHit
+=
UpdateScore
;
}
public
void
StartStage
()
...
...
RhythmKata/Assets/Scripts/IngameUIManager.cs
View file @
e478b624
...
...
@@ -7,13 +7,11 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
{
public
GameObject
ringUIPrefab
;
public
List
<
GameObject
>
hitEffectPrefabs
=
new
List
<
GameObject
>();
private
void
Start
()
{
NoteObject
.
OnNoteHit
+=
OnNoteHit
;
}
public
void
OnNoteHit
(
NoteHitType
type
,
int
score
)
public
void
OnNoteHit
(
NoteHitType
type
)
{
}
...
...
RhythmKata/Assets/Scripts/NoteObject.cs
View file @
e478b624
...
...
@@ -7,14 +7,15 @@ using UnityEngine.UI;
public
enum
NoteHitType
{
PERFECT
,
GOOD
,
BAD
,
PERFECT_OTHER_HAND
,
HIT
,
HIT_OTHER_HAND
,
MISS
}
public
abstract
class
NoteObject
:
MonoBehaviour
{
public
static
Action
<
NoteHitType
,
int
>
OnNoteHit
;
public
static
Action
<
NoteHitType
>
OnNoteHit
;
protected
float
remainedTime
;
public
Vector3
startPoint
{
get
{
return
endPoint
+
new
Vector3
(
0
,
0
,
50
);
}
}
...
...
@@ -23,7 +24,6 @@ public abstract class NoteObject : MonoBehaviour
public
float
maxRemainedTime
=
1
;
public
float
perfectZ
=
10
;
protected
virtual
void
OnDestroy
()
{
...
...
@@ -34,7 +34,12 @@ public abstract class NoteObject : MonoBehaviour
remainedTime
=
maxRemainedTime
;
}
public
abstract
void
NoteHit
(
NoteHitType
type
);
public
virtual
void
NoteHit
(
NoteHitType
type
)
{
OnNoteHit
?.
Invoke
(
type
);
Instantiate
(
PlayEngine
.
inst
.
hitEffectPrefabs
[(
int
)
type
],
transform
.
position
,
Quaternion
.
identity
);
Destroy
(
gameObject
);
}
public
virtual
void
SetPosition
(
float
remainedTime
)
{
...
...
RhythmKata/Assets/Scripts/PlayEngine.cs
View file @
e478b624
...
...
@@ -19,6 +19,9 @@ public class PlayEngine : SingletonBehaviour<PlayEngine>
private
double
startDspTime
;
public
int
test
;
public
List
<
GameObject
>
hitEffectPrefabs
=
new
List
<
GameObject
>();
public
void
Start
()
{
audioSource
=
GetComponent
<
AudioSource
>();
...
...
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