private void CreateNoteAtCurser(float Time, float Degree) { if (!Enable) { return; } int Type = ConvertValueToType(TypeDropdown.value); int Size = SizeDropdown.value; if (Type == 5) { Lanotalium.Chart.LanotaHoldNote New = new Lanotalium.Chart.LanotaHoldNote(); New.Type = 5; New.Duration = 1; New.Degree = Degree; New.Time = Time; New.Size = Size; OperationManager.AddHoldNote(New); } else { Lanotalium.Chart.LanotaTapNote New = new Lanotalium.Chart.LanotaTapNote(); New.Type = Type; New.Time = Time; New.Degree = Degree; New.Size = Size; OperationManager.AddTapNote(New); } }
public void InstantiateNote(Lanotalium.Chart.LanotaTapNote Note) { Note.TapNoteGameObject = Instantiate(GetPrefab(Note.Type, Note.Size, Note.Combination), transform); Note.InstanceId = Note.TapNoteGameObject.GetInstanceID(); Note.Sprite = Note.TapNoteGameObject.GetComponentInChildren <SpriteRenderer>(); Note.TapNoteGameObject.SetActive(false); }
public void CreateCatchRail() { if (LimSystem.ChartContainer == null) { return; } int Quantity; if (OperationManager.SelectedTapNote.Count != 2) { LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Window_Creator_CreateCatchRail_ErrSelection"]); return; } if (!int.TryParse(CreateCatchRailQuantityInputField.text, out Quantity)) { LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Window_Creator_CreateCatchRail_ErrQuantity"]); return; } if (Quantity <= 0) { LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Window_Creator_CreateCatchRail_ErrRange"]); return; } OperationManager.SelectedTapNote.Sort((Lanotalium.Chart.LanotaTapNote a, Lanotalium.Chart.LanotaTapNote b) => { return(a.Time.CompareTo(b.Time)); }); float DeltaTime = (OperationManager.SelectedTapNote[1].Time - OperationManager.SelectedTapNote[0].Time) / (Quantity + 1); float DeltaDegree = (OperationManager.SelectedTapNote[1].Degree - OperationManager.SelectedTapNote[0].Degree) / (Quantity + 1); for (int i = 1; i <= Quantity; ++i) { Lanotalium.Chart.LanotaTapNote New = OperationManager.SelectedTapNote[0].DeepCopy(); New.Type = 4; New.Time += i * DeltaTime; New.Degree += i * DeltaDegree; OperationManager.AddTapNote(New, true, false, false); } LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Window_Creator_CreateCatchRail_Success"]); }
public void CreateTapNote() { if (LimSystem.ChartContainer == null) { return; } Lanotalium.Chart.LanotaTapNote New = new Lanotalium.Chart.LanotaTapNote(); New.Time = TunerManager.ChartTime; OperationManager.AddTapNote(New); OperationManager.InspectorManager.ArrangeComponentsUi(); }
public bool IsTapNoteinScanRange(Lanotalium.Chart.LanotaTapNote Note) { if (!Enable) { return(true); } if (RangePairCount == 0) { return(false); } for (int i = 0; i < RangePairCount; ++i) { if (Note.Time + 0.2 >= Starts[i] && Note.Time <= Ends[i]) { return(true); } } return(false); }
public void CopySelectedNotes() { if (!OperationManager.TunerManager.isInitialized) { return; } if (!ValidateCopyInstruction()) { return; } bool HasTap = false, HasHold = false; float FirstNoteTime = 0; if (OperationManager.SelectedTapNote.Count != 0) { OperationManager.SelectedTapNote.Sort((Lanotalium.Chart.LanotaTapNote a, Lanotalium.Chart.LanotaTapNote b) => { return(a.Time.CompareTo(b.Time)); }); FirstNoteTime = OperationManager.SelectedTapNote[0].Time; HasTap = true; } if (OperationManager.SelectedHoldNote.Count != 0) { OperationManager.SelectedHoldNote.Sort((Lanotalium.Chart.LanotaHoldNote a, Lanotalium.Chart.LanotaHoldNote b) => { return(a.Time.CompareTo(b.Time)); }); FirstNoteTime = OperationManager.SelectedHoldNote[0].Time; HasHold = true; } if (HasTap && HasHold) { FirstNoteTime = Mathf.Min(OperationManager.SelectedTapNote[0].Time, OperationManager.SelectedHoldNote[0].Time); } if (!HasTap && !HasHold) { return; } if (HasTap) { foreach (float Target in CopyTargets) { float Delta = Target - FirstNoteTime; foreach (Lanotalium.Chart.LanotaTapNote Tap in OperationManager.SelectedTapNote) { Lanotalium.Chart.LanotaTapNote New = Tap.DeepCopy(); New.Time += Delta; OperationManager.AddTapNote(New, true, false, false); } } } if (HasHold) { foreach (float Target in CopyTargets) { float Delta = Target - FirstNoteTime; foreach (Lanotalium.Chart.LanotaHoldNote Hold in OperationManager.SelectedHoldNote) { Lanotalium.Chart.LanotaHoldNote New = Hold.DeepCopy(); New.Time += Delta; OperationManager.AddHoldNote(New, true, false, false); } } } OperationManager.SelectNothing(); LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Copier_Msg_Success"]); }