This commit is contained in:
CortexCore
2023-11-15 23:54:54 +08:00
parent ee3ecec6cb
commit 3c837a4a33
356 changed files with 73756 additions and 26493 deletions

View File

@@ -10,7 +10,6 @@ using AYellowpaper.SerializedCollections;
using BITFALL.Entities.Inventory;
using BITKit.Entities.Slot;
using Cysharp.Threading.Tasks;
using UnityEngine.AddressableAssets;
namespace BITFALL
{
@@ -157,7 +156,7 @@ namespace BITFALL
protected void Drop(IBasicItem item)
{
OnDrop?.Invoke(item);
var prefab = Addressables.LoadAssetAsync<AssetableItem>(item.AddressablePath).WaitForCompletion();
var prefab = item.GetAssetable();
var _transform = transform;
var position = _transform.position;
var rotation = _transform.rotation;

View File

@@ -39,7 +39,7 @@ namespace BITFALL
}
private void OnActive(ISelectable obj)
{
if (!obj.Transform.TryGetComponentAny<WorldItem>(out var item)) return;
if (!obj.Transform.TryGetComponent<WorldItem>(out var item)) return;
var _item = item.Pick();
if(item.GetAssetable().IsImprovised)
{