using UnityEngine; using System.Collections; public class UAVFactory { public static UAVehicle CreateUAVechile(Craft craft, UAVItem uavItem, Map map) { GameObject uavPrefab = Resources.Load(Config.UAV_PREFAB_FOLDER + uavItem.GetData().model); GameObject uavObj = GameObject.Instantiate(uavPrefab); UAVehicle uav = uavObj.GetComponent (); uav.Init (map, craft, uavItem); uav.typeId = MapObjectUtil.TypeId.UAV.GetHashCode(); return uav; } }