Пример #1
0
        protected virtual void NetFuncCraftItemByWorkbench(PackedUInt objectId, int dataId)
        {
            if (!CanDoActions())
            {
                return;
            }

            WorkbenchEntity workbenchEntity = null;

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

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

            workbenchEntity.CraftItem(this, dataId);
        }
Пример #2
0
 public void UpdateDataForWorkbench(WorkbenchEntity workbenchEntity)
 {
     CrafterType      = CrafterType.Workbench;
     BuildingObjectId = workbenchEntity.ObjectId;
     UpdateData(workbenchEntity.itemCrafts);
 }