Remove faulty toggling of anchor "cur".
This commit is contained in:
@@ -60,24 +60,20 @@ namespace Cryville.Crtr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(ContainerState s, StampedEvent ev) {
|
public override void Update(ContainerState s, StampedEvent ev) {
|
||||||
if (s.CloneType == 0) {
|
|
||||||
#if UNITY_5_6_OR_NEWER
|
|
||||||
a_cur.SetPositionAndRotation(GetFramePoint(s.Parent, s.Track), GetFrameRotation(s.Parent, s.Track));
|
|
||||||
#else
|
|
||||||
a_cur.position = GetFramePoint(s.Parent, s.Track);
|
|
||||||
a_cur.rotation = GetFrameRotation(s.Parent, s.Track);
|
|
||||||
#endif
|
|
||||||
OpenAnchor(_a_cur);
|
|
||||||
base.Update(s, ev);
|
|
||||||
CloseAnchor(_a_cur);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
base.Update(s, ev);
|
base.Update(s, ev);
|
||||||
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 == 0) {
|
||||||
|
#if UNITY_5_6_OR_NEWER
|
||||||
|
a_cur.SetPositionAndRotation(Position, Rotation);
|
||||||
|
#else
|
||||||
|
a_cur.position = Position;
|
||||||
|
a_cur.rotation = Rotation;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else if (s.CloneType == 2) {
|
||||||
if (!gogroup) return;
|
if (!gogroup) return;
|
||||||
Chart.Note tev = Event;
|
Chart.Note tev = Event;
|
||||||
if (tev.IsLong) {
|
if (tev.IsLong) {
|
||||||
@@ -100,7 +96,6 @@ namespace Cryville.Crtr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public override void EndUpdate(ContainerState s) {
|
public override void EndUpdate(ContainerState s) {
|
||||||
if (s.CloneType == 2 && gogroup) {
|
if (s.CloneType == 2 && gogroup) {
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ namespace Cryville.Crtr {
|
|||||||
float length;
|
float length;
|
||||||
|
|
||||||
public override void Update(ContainerState s, StampedEvent ev) {
|
public override void Update(ContainerState s, StampedEvent ev) {
|
||||||
|
base.Update(s, ev);
|
||||||
if (s.CloneType == 0) {
|
if (s.CloneType == 0) {
|
||||||
pwp = Vector3.zero;
|
pwp = Vector3.zero;
|
||||||
cpt = s.ScreenPoint;
|
cpt = s.ScreenPoint;
|
||||||
@@ -70,13 +71,8 @@ namespace Cryville.Crtr {
|
|||||||
a_cur.position = s.ScreenPoint;
|
a_cur.position = s.ScreenPoint;
|
||||||
a_cur.rotation = Quaternion.Euler(s.Direction);
|
a_cur.rotation = Quaternion.Euler(s.Direction);
|
||||||
#endif
|
#endif
|
||||||
OpenAnchor(_a_cur);
|
|
||||||
base.Update(s, ev);
|
|
||||||
CloseAnchor(_a_cur);
|
|
||||||
}
|
}
|
||||||
else {
|
else if (s.CloneType == 2 || s.CloneType == 3) {
|
||||||
base.Update(s, ev);
|
|
||||||
if (s.CloneType == 2 || s.CloneType == 3) {
|
|
||||||
var tpt = s.ScreenPoint;
|
var tpt = s.ScreenPoint;
|
||||||
var tsv = s.ScrollVelocity;
|
var tsv = s.ScrollVelocity;
|
||||||
|
|
||||||
@@ -104,7 +100,6 @@ namespace Cryville.Crtr {
|
|||||||
}
|
}
|
||||||
else UpdatePosition(s);
|
else UpdatePosition(s);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void UpdatePosition(ContainerState s) {
|
void UpdatePosition(ContainerState s) {
|
||||||
cpt = s.ScreenPoint;
|
cpt = s.ScreenPoint;
|
||||||
|
|||||||
Reference in New Issue
Block a user