Commit c6d19620 authored by wanqing's avatar wanqing

脚本优化

parent 9346c493
......@@ -193,11 +193,11 @@ public class BattleCtrl : MonoBehaviour
{
varGo.transform.SetParent(parent, false);
varGo.transform.localPosition = Vector3.zero;
for (int i = 0; i < varGo.transform.childCount; i++)
{
varGo.transform.GetChild(i).GetComponent<Rigidbody>().mass = 0.1f;
//for (int i = 0; i < varGo.transform.childCount; i++)
//{
//varGo.transform.GetChild(i).GetComponent<Rigidbody>().mass = 0.1f;
//varGo.transform.GetChild(i).GetComponent<Rigidbody>().AddForce(Vector3.down * 20000000.0f, ForceMode.Force);
}
//}
varGo.SetActive(true);
}
return varGo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment