public override bool IsStorageEntityOpen(StorageEntity storageEntity)
        {
            if (storageEntity == null)
            {
                return(false);
            }
            StorageId id = new StorageId(StorageType.Building, storageEntity.Id);

            return(usingStorageCharacters.ContainsKey(id) &&
                   usingStorageCharacters[id].Count > 0);
        }
예제 #2
0
        protected virtual void NetFuncOpenStorage(PackedUInt objectId)
        {
            if (!CanDoActions())
            {
                return;
            }

            StorageEntity storageEntity = null;

            if (!TryGetEntityByObjectId(objectId, out storageEntity))
            {
                return;
            }

            if (Vector3.Distance(CacheTransform.position, storageEntity.CacheTransform.position) > gameInstance.conversationDistance + 5f)
            {
                return;
            }

            OpenStorage(StorageType.Building, storageEntity.Id);
        }