void ResetAllBear() { dataCtrl.freshUnLockBearWith(_dataPlayer.Level); float angleDelta = 360 / _Num; GameObject tem; WGBearPanel preBear = null; float rr = 0; for (int i = 0; i < _Num; i++) { tem = new GameObject(); tem.name = "bear" + i; WGBearPanel bp = tem.AddComponent <WGBearPanel>(); szBearPanel.Add(bp); if (preBear != null) { preBear.right = bp; bp.left = preBear; } preBear = bp; if (i == _Num - 1) { bp.right = szBearPanel[0]; szBearPanel[0].left = bp; } bp.index = i; tem.transform.rotation = Quaternion.Euler(0, angleDelta * i + 180, 0); tem.transform.parent = BearRoot.transform; rr = Mathf.PI / 2 + i * angleDelta * Mathf.PI / 180f; tem.transform.localPosition = new Vector3(-fRadiou * Mathf.Cos(rr), -fRadiou * Mathf.Sin(rr), 0) + tTurnplateCenter.localPosition; //int id = 5001+i; int id = GetNextBearID(bp); bp.id = id; CreateBearWith(id, tem.transform); } }