/// <summary> /// 创建掉落道具实例 /// </summary> public void CreateItemCptDrop(ItemsBean itemData, Vector3 position, ItemDropStateEnum ItemCptDropState, Vector3 dropDirection) { if (itemData.itemId == 0) { return; } manager.GetItemsObjById(-1, (objModel) => { GameObject objCommon = Instantiate(gameObject, objModel); ItemCptDrop ItemCptDrop = objCommon.GetComponent <ItemCptDrop>(); ItemCptDrop.SetData(itemData, position, dropDirection); ItemCptDrop.SetItemDropState(ItemCptDropState); }); }