Commit 25d2d3e3 authored by natonato's avatar natonato

merge prep

parent 15faafd2
......@@ -39,7 +39,7 @@ namespace Core
// convert all bms note to level note
foreach (var note in notes)
{
var levelNote = Note.Create(note);
var levelNote = Note.Create(note, bpm);
if (levelNote != null)
level.AddNote(levelNote);
......
......@@ -12,6 +12,16 @@ namespace Core
{
notes.Enqueue(note);
}
void HandleInput()
{
}
void UpdateNotes()
{
}
}
abstract class Note
......@@ -36,7 +46,7 @@ namespace Core
// factory method
// may return null if given note is not supported
public static Note Create(BmsNote bn)
public static Note Create(BmsNote bn, double bpm)
{
Note note = null;
HandType handType = HandType.None;
......@@ -78,6 +88,7 @@ namespace Core
note.FromBmsNum(bn.num);
note.HandType = handType;
note.Time = bn.barTime * (60.0 / bpm * 4);
return note;
}
......@@ -89,7 +100,7 @@ namespace Core
protected override GameObject CreateGameObjectImpl()
{
throw new NotImplementedException();
return GameObject.CreatePrimitive(PrimitiveType.Cube);
}
protected override void FromBmsNum(string num)
......
......@@ -18,6 +18,8 @@ public class PlayEngine : MonoBehaviour
var level = bms.ToLevel();
this.level = level;
}
private void Update()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment