diff --git a/Assets/Cryville/Crtr/Chart.cs b/Assets/Cryville/Crtr/Chart.cs index ceca7bf..e1721c3 100644 --- a/Assets/Cryville/Crtr/Chart.cs +++ b/Assets/Cryville/Crtr/Chart.cs @@ -109,9 +109,7 @@ namespace Cryville.Crtr { public float BeatOffset; [JsonIgnore] - public abstract int Priority { - get; - } + public abstract int Priority { get; } public ChartEvent Clone() { return (ChartEvent)MemberwiseClone(); @@ -259,9 +257,7 @@ namespace Cryville.Crtr { } } - public override int Priority { - get { return 10; } - } + public override int Priority { get { return 10; } } public class Group : EventContainer { public List tracks = new List(); @@ -281,15 +277,11 @@ namespace Cryville.Crtr { default: return base.GetEventsOfType(type); } } - public override int Priority { - get { return 10; } - } + public override int Priority { get { return 10; } } } public class Track : EventContainer { - public override int Priority { - get { return 10; } - } + public override int Priority { get { return 10; } } } public class Motion : ChartEvent { @@ -375,9 +367,7 @@ namespace Cryville.Crtr { [DefaultValue(0.0f)] public float sumfix = 0.0f; - public override int Priority { - get { return -2; } - } + public override int Priority { get { return -2; } } public Motion() { SubmitPropOp("motion", new PropOp.String(v => motion = v)); @@ -413,9 +403,7 @@ namespace Cryville.Crtr { default: return base.GetEventsOfType(type); } } - public override int Priority { - get { return 12; } - } + public override int Priority { get { return 12; } } } public class Judge : ChartEvent { @@ -428,9 +416,7 @@ namespace Cryville.Crtr { } #pragma warning restore IDE1006 - public override int Priority { - get { return 0; } - } + public override int Priority { get { return 0; } } public Judge() { SubmitPropSrc("name", new PropSrc.Identifier(() => Id.Key)); @@ -444,9 +430,7 @@ namespace Cryville.Crtr { public class Signature : ChartEvent { public float? tempo; - public override int Priority { - get { return -4; } - } + public override int Priority { get { return -4; } } } public List sounds; @@ -457,9 +441,7 @@ namespace Cryville.Crtr { // TODO [Obsolete] public float offset; - public override int Priority { - get { return 0; } - } + public override int Priority { get { return 0; } } } } } diff --git a/Assets/Cryville/Crtr/Event/ContainerHandler.cs b/Assets/Cryville/Crtr/Event/ContainerHandler.cs index 05d50c2..43a6c94 100644 --- a/Assets/Cryville/Crtr/Event/ContainerHandler.cs +++ b/Assets/Cryville/Crtr/Event/ContainerHandler.cs @@ -155,8 +155,8 @@ namespace Cryville.Crtr.Event { #if UNITY_5_6_OR_NEWER tev.Target.Transform.SetPositionAndRotation(Position, Rotation); #else - tev.Target.Transform.position = GetCurrentWorldPoint(); - tev.Target.Transform.rotation = Quaternion.Euler(s.Direction); + tev.Target.Transform.position = Position; + tev.Target.Transform.rotation = Rotation; #endif skinContainer.MatchDynamic(s); CloseAnchor(); diff --git a/Assets/Cryville/Crtr/Event/ContainerState.cs b/Assets/Cryville/Crtr/Event/ContainerState.cs index 69e3c18..da9ca7d 100644 --- a/Assets/Cryville/Crtr/Event/ContainerState.cs +++ b/Assets/Cryville/Crtr/Event/ContainerState.cs @@ -70,7 +70,6 @@ namespace Cryville.Crtr.Event { public byte CloneType; public ContainerState rootPrototype = null; - private ContainerState prototype = null; public ContainerHandler Handler { get; @@ -140,7 +139,6 @@ namespace Cryville.Crtr.Event { else if (ct == 3) Handler.ns = r; else if (ct >= 16) Handler.ps = r; else throw new InvalidOperationException("Invalid clone type"); - r.prototype = this; r.CloneType = ct; return r; } diff --git a/Assets/Cryville/Crtr/Event/EventBus.cs b/Assets/Cryville/Crtr/Event/EventBus.cs index de28fe2..cc53ffe 100644 --- a/Assets/Cryville/Crtr/Event/EventBus.cs +++ b/Assets/Cryville/Crtr/Event/EventBus.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; namespace Cryville.Crtr.Event { public class EventBus : StateBase, IDisposable { - EventBus prototype = null; public ContainerState RootState { get; private set; @@ -25,7 +24,6 @@ namespace Cryville.Crtr.Event { public EventBus Clone(byte ct, float offsetTime = 0) { var r = (EventBus)MemberwiseClone(); - r.prototype = this; r.states = new Dictionary(); r.activeStates = new HashSet(); r.invalidatedStates = new HashSet(); diff --git a/Assets/Cryville/Crtr/GroupHandler.cs b/Assets/Cryville/Crtr/GroupHandler.cs index fd7e63f..235dffb 100644 --- a/Assets/Cryville/Crtr/GroupHandler.cs +++ b/Assets/Cryville/Crtr/GroupHandler.cs @@ -1,7 +1,6 @@ using Cryville.Common.Math; using Cryville.Crtr.Event; using System; -using System.Linq; using UnityEngine; namespace Cryville.Crtr { @@ -20,11 +19,7 @@ namespace Cryville.Crtr { public override void PreInit() { base.PreInit(); - tracks = ( - from c in cs.Children - where c.Value.Container is Chart.Track - select c.Value - ).ToArray(); + tracks = cs.TypedChildren[typeof(Chart.Track)].ToArray(); matFrame = SquareMatrix.WithPolynomialCoefficients(tracks.Length); frame1 = new ColumnVector(tracks.Length); frame2 = new ColumnVector(tracks.Length); diff --git a/Assets/Cryville/Crtr/NoteHandler.cs b/Assets/Cryville/Crtr/NoteHandler.cs index cfe420d..6a94b14 100644 --- a/Assets/Cryville/Crtr/NoteHandler.cs +++ b/Assets/Cryville/Crtr/NoteHandler.cs @@ -97,8 +97,7 @@ namespace Cryville.Crtr { if (s.CloneType <= 2) { Position = GetFramePoint(s.Parent, s.Track); Rotation = GetFrameRotation(s.Parent, s.Track); - if (s.CloneType == 2) { - if (!gogroup || !Event.IsLong) return; + if (s.CloneType == 2 && gogroup && Event.IsLong) { foreach (var i in sgos) i.AppendPoint(Position, Rotation); }