void Security.ISkyTrakSW.MakeTestShot(RIPESpeedParamsType speedParams, RIPESpinParamsType spinParams, RIPEFlightParamsType flightParams)
 {
     if (this.OnBallLaunchedAction != null)
     {
         this.OnBallLaunchedAction(speedParams, spinParams, flightParams);
     }
 }
Beispiel #2
0
 private void HardwareDelegateOnLaunchBall(RIPESpeedParamsType ripeSpeedParamsType, RIPESpinParamsType ripeSpinParamsType, RIPEFlightParamsType ripeFlightParams)
 {
     UnityEngine.Debug.Log("CCimualtionManager HardwareDelegate called");
     if (this.m_ballNotLaunched)
     {
         float single  = 0f;
         float single1 = 0f;
         float single2 = 0f;
         //if (!this.RIPESpeedParamsEquals(FlightData.Instance.GetOldSpeedParams(), ripeSpeedParamsType) || !this.RIPESpinParamsEquals(FlightData.Instance.GetOldSpinParams(), ripeSpinParamsType) || !this.RIPEFlightParamsEquals(FlightData.Instance.GetOldFlightParams(), ripeFlightParams))
         //{
         LaunchBall(ripeSpeedParamsType.launchAngle, ripeSpeedParamsType.horizontalAngle, ripeSpeedParamsType.totalSpeed, single, single1, single2, ripeSpeedParamsType.horizontalAngle, "ClubName", ripeFlightParams.flightDuration, ripeFlightParams.maxHeight, -ripeSpinParamsType.backSpin, ripeSpinParamsType.sideSpin, ripeSpinParamsType.spinAxis, ripeSpinParamsType.totalSpin, true);
         FlightData.Instance.SetOldSpeedParams(ripeSpeedParamsType);
         FlightData.Instance.SetOldSpinParams(ripeSpinParamsType);
         FlightData.Instance.SetOldFlightParams(ripeFlightParams);
         //}
         //this._numericDisplays.ResetDials();
     }
 }
Beispiel #3
0
    private bool RIPESpeedParamsEquals(RIPESpeedParamsType old, RIPESpeedParamsType newer)
    {
        bool flag  = false;
        bool flag1 = false;
        bool flag2 = false;

        if (Mathf.Abs(old.launchAngle - newer.launchAngle) >= 0.001f)
        {
            UnityEngine.Debug.Log(string.Concat(new object[] { "Launch Angle False | Old : ", old.launchAngle, "  New : ", newer.launchAngle }));
            flag = false;
        }
        else
        {
            UnityEngine.Debug.Log(string.Concat(new object[] { "Launch Angle True | Old : ", old.launchAngle, "  New : ", newer.launchAngle }));
            flag = true;
        }
        if (Mathf.Abs(old.horizontalAngle - newer.horizontalAngle) >= 0.001f)
        {
            UnityEngine.Debug.Log(string.Concat(new object[] { "Horizontal Angle False | Old : ", old.horizontalAngle, "  New : ", newer.horizontalAngle }));
            flag1 = false;
        }
        else
        {
            UnityEngine.Debug.Log(string.Concat(new object[] { "Horizontal Angle True | Old : ", old.horizontalAngle, "  New : ", newer.horizontalAngle }));
            flag1 = true;
        }
        if (Mathf.Abs(old.totalSpeed - newer.totalSpeed) >= 0.001f)
        {
            UnityEngine.Debug.Log(string.Concat(new object[] { "Total Speed True | Old : ", old.totalSpeed, "  New : ", newer.totalSpeed }));
            flag2 = false;
        }
        else
        {
            UnityEngine.Debug.Log(string.Concat(new object[] { "Total Speed True | Old : ", old.totalSpeed, "  New : ", newer.totalSpeed }));
            flag2 = true;
        }
        return(!flag || !flag1 ? false : flag2);
    }
 public void SetOldSpeedParams(RIPESpeedParamsType newerData)
 {
     this.oldSpeedParams = newerData;
 }