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