public virtual void throwItem(ItemBasis item, ItemInventory targetinv, Action callback = null) { ItemEntity entity; GameController.SoundController.playSE(SoundNameList.Item_Throw); //GameController.PlayingLogger.addLog((targetinv != null).ToString()); if (targetinv != null && targetinv.contains(item)) { targetinv.remove(item); entity = ObjectEntityFactory.enableItemEntity(item, this.CurrentPosition); //ItemEntityFactory.instantiateItemEntity(item, this.CurrentPosition); //Debug.Log("Erase!"+item.Erase); } else { entity = ccm.OnItemEntity; entity.Object = item; } entity.throwItem(CurrentDirection, Parameter.WallPenatrableThrow, this,callback); GameController.PlayingLogger.thorwItem(this, item); }
public virtual void putItem(ItemBasis item, ItemInventory targetinv) { if (targetinv.contains(item)) { //Debug.Log("Put Item!"); //Parameter.Inventory.remove(item); targetinv.remove(item); ObjectEntityFactory.enableItemEntity(item, this.CurrentPosition); } }