void Set_Static_Wheel(GameObject wheelObject, string direction)
        {
            Static_Wheel_CS staticWheelScript = wheelObject.AddComponent <Static_Wheel_CS>();

            staticWheelScript.Is_Left       = (direction == "L");
            staticWheelScript.Parent_Script = thisTransform.GetComponent <Static_Wheel_Parent_CS>();
        }
Пример #2
0
        void Create_Static_Wheel(string direction, Vector3 position)
        {
            GameObject gameObject = Create_GameObject("IdlerWheel", direction, position);

            Add_Mesh(gameObject);
            // Static_Wheel_CS script
            Static_Wheel_CS staticWheelScript = gameObject.AddComponent <Static_Wheel_CS>();

            staticWheelScript.Is_Left       = (direction == "L");
            staticWheelScript.Parent_Script = thisTransform.GetComponent <Static_Wheel_Parent_CS>();
        }