fix chart reading, scroll chart notes!

This commit is contained in:
muskit committed 2023-09-16 00:44:02 -07:00
1 parent 6a98acce67
commit c8bd5c16c8
9 files changed
+126 -29

No files matched your search

@@ -0,0 +1,16 @@
using Godot;
using WacK.Data.Chart;
namespace WacK.Things.TunnelObjects
{
public partial class THNoteHold : THNotePlay
{
public new NoteHold noteData;
public void Init(NoteHold noteData)
{
base.Init(noteData);
this.noteData = noteData;
}
}
}
@@ -0,0 +1,28 @@
using Godot;
using WacK.Data.Chart;
namespace WacK.Things.TunnelObjects
{
public partial class THNotePlay : Control
{
public NotePlay noteData;
public void Init(NotePlay noteData)
{
this.noteData = noteData;
SetSizePos((int)noteData.position, (int)noteData.size);
}
public void SetSizePos(int pos, int size)
{
// TODO: pos + size >= 60
var nPos = Position;
nPos.X = pos * (1920f/60) - 12;
Position = nPos;
var nSize = Size;
nSize.X = size * (1920f/60) + 24;
Size = nSize;
}
}
}