public void AddArcTap(ArcArcTap arctap) { if (arctap.Timing > EndTiming || arctap.Timing < Timing) { throw new ArgumentOutOfRangeException("ArcTap 时间不在 Arc 范围内"); } ArcTimingManager timingManager = ArcTimingManager.Instance; int offset = ArcAudioManager.Instance.AudioOffset; arctap.Instantiate(this); float t = 1f * (arctap.Timing - Timing) / (EndTiming - Timing); arctap.LocalPosition = new Vector3(ArcAlgorithm.ArcXToWorld(ArcAlgorithm.X(XStart, XEnd, t, LineType)), ArcAlgorithm.ArcYToWorld(ArcAlgorithm.Y(YStart, YEnd, t, LineType)) - 0.5f, -timingManager.CalculatePositionByTimingAndStart(Timing + offset, arctap.Timing + offset) / 1000f - 0.6f); ArcTaps.Add(arctap); }
public void RemoveArcTap(ArcArcTap arctap) { arctap.Destroy(); ArcTaps.Remove(arctap); }