Code cleanup.

This commit is contained in:
2022-10-02 16:25:45 +08:00
parent 6fb7b97bd8
commit 5fb135bfa5
16 changed files with 26 additions and 29 deletions

View File

@@ -32,8 +32,12 @@ namespace Cryville.Crtr {
cpt = s.ScreenPoint;
ptime = s.Time;
if (s.CloneType == 2) {
#if UNITY_5_6_OR_NEWER
a_head.SetPositionAndRotation(GetCurrentWorldPoint(), Quaternion.Euler(s.Direction));
#else
a_head.position = GetCurrentWorldPoint();
a_head.rotation = Quaternion.Euler(s.Direction);
#endif
}
else if (s.CloneType == 3) {
spos = Vector3.zero;
@@ -114,8 +118,12 @@ namespace Cryville.Crtr {
i.AppendPoint(p, s.QuatDir);
i.Seal();
}
#if UNITY_5_6_OR_NEWER
a_tail.SetPositionAndRotation(GetCurrentWorldPoint(), Quaternion.Euler(ts.Direction));
#else
a_tail.position = GetCurrentWorldPoint();
a_tail.rotation = Quaternion.Euler(ts.Direction);
#endif
}
else if (s.CloneType == 3) EndUpdatePosition(ns);
else if (s.CloneType >= 16) EndUpdatePosition(ps);