|
|
@@ -29,8 +29,6 @@ public class AimHandler : MonoBehaviour
|
|
|
//陀螺仪校准进度记录
|
|
|
[NonSerialized] public int gyrCalibrateCompleteCount = 0;
|
|
|
[NonSerialized] public int gyrCalibrateTotalCount = 2000;
|
|
|
- //时差记录(新版算法不需要)
|
|
|
- [NonSerialized] public long msOld = 0;
|
|
|
|
|
|
public static AimHandler ins;
|
|
|
|
|
|
@@ -41,8 +39,14 @@ public class AimHandler : MonoBehaviour
|
|
|
|
|
|
m_axisHandler = new Axis9NopackHandler(this);
|
|
|
m_axisHandler.Init();
|
|
|
+ // StartCoroutine(TestRecord());
|
|
|
}
|
|
|
|
|
|
+ // System.Collections.IEnumerator TestRecord() {
|
|
|
+ // while (LoginMgr.myUserInfo.id == 0) yield return null;
|
|
|
+ // UserComp.Instance.saveMac();
|
|
|
+ // }
|
|
|
+
|
|
|
[NonSerialized] public Quaternion newRotation = Quaternion.identity;
|
|
|
[NonSerialized] public bool lerpForRotation = true;
|
|
|
[NonSerialized] public float lerpTimeRate = 7;
|
|
|
@@ -115,11 +119,17 @@ public class AimHandler : MonoBehaviour
|
|
|
m_ban9AxisCalculate = ban;
|
|
|
if (!ban)
|
|
|
{
|
|
|
- msOld = default;
|
|
|
+ SetMsOldDefault();
|
|
|
if (m_controlObj) m_controlObj.localRotation = newRotation;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void SetMsOldDefault()
|
|
|
+ {
|
|
|
+ if (m_axisHandler.GetType() == typeof(Axis9NopackHandler))
|
|
|
+ (m_axisHandler as Axis9NopackHandler).msOld = default;
|
|
|
+ }
|
|
|
+
|
|
|
public void DoIdentity()
|
|
|
{
|
|
|
m_axisHandler.DoIdentity();
|