using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GearAttacher : MonoBehaviour {

	[SerializeField] GameObject[] _gearPrefabs;
	[SerializeField] Transform _parent;
	//[SerializeField] Vector3 _positionOffset;
	//[SerializeField] Vector3 _eulerOffset;

	void Awake () {
		if(_gearPrefabs.Length > 0 && _parent != null) AttachGear();
	}

	void AttachGear() {
		foreach(GameObject g in _gearPrefabs){
			GameObject tmp = Instantiate(g, _parent.transform);
			tmp.transform.localEulerAngles = Vector3.zero;
			tmp.transform.localPosition = Vector3.zero;
			//tmp.transform.localEulerAngles = _eulerOffset;
			//tmp.transform.position = _parent.TransformPoint(_positionOffset);
		}
	}
	

}
