private void Start()//OYM:滚回来自己来趟这趟屎山
        {
            if (!isInitialize)
            {
                initializePoint();
                initializeCollider(false, isGenerateByFixedPoint);
            }

            if (jointAndPointControlls == null)
            {
                return;
            }

            dataPackage = new DataPackage();
            if (Application.isPlaying)
            {
                isInitialize = true;
                for (int i = 0; i < jointAndPointControlls.Length; i++)
                {
                    jointAndPointControlls[i].GetData(ref dataPackage);//OYM:在这里对各种joint和point进行分类与编号
                }
                colliderControll.GetData(ref dataPackage);
                dataPackage.SetNativeArray();
                initializeScale = transform.lossyScale.x;
                isInitialize    = true;
            }
            delayTime = delayTime < 0.001f ? 0.001f : delayTime;
        }
示例#2
0
 public void Reset()
 {
     if (Application.isPlaying)
     {
         RestorePoint();
         initializePoint();
         dataPackage.Dispose(true);
         for (int i = 0; i < jointAndPointControlls.Length; i++)
         {
             jointAndPointControlls[i].GetData(dataPackage);//OYM:在这里对各种joint和point进行分类与编号
         }
         dataPackage.SetNativeArray();
         delayTime = delayTime < 0.017f ? 0.017f : delayTime;
     }
 }