Пример #1
0
    void Start()
    {
        hingeManager = GetComponent <HingeManager>();

        Transform[] children = GetComponentsInChildren <Transform>();
        for (int i = 0; i < children.Length; i++)
        {
            if (children[i].name.Equals("bottom"))
            {
                bottomNode = children[i].gameObject;
            }
            else if (children[i].name.Equals("top"))
            {
                topNode = children[i].gameObject;
            }
            else if (children[i].name.Equals("wood"))
            {
                wood = children[i].gameObject;
            }
        }
    }
Пример #2
0
 void Start()
 {
     hingeManager = GetComponent <HingeManager>();
 }