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