Пример #1
0
    private void CreateBody(NBodySystem system, GravityObjectInitial init)
    {
        GameObject obj = Instantiate(system.GravityObjectPrefab);

        obj.transform.parent        = system.gameObject.transform;
        obj.transform.localPosition = init.StartPos;
        GravityObject gObj = obj.GetComponent <GravityObject>();

        gObj.SetInit(init);
    }