Method Clone
Clone(NwGameObject, string?, bool, bool)
Creates a copy of this item.
public NwItem Clone(NwGameObject targetInventory, string? newTag = null, bool copyLocalState = true, bool preserveDropFlag = true)
Parameters
targetInventoryNwGameObjectThe target inventory to create the cloned item.
newTagstringA new tag to assign the cloned item.
copyLocalStateboolIf true, local variables on the item are copied.
preserveDropFlagboolIf true, preserves the Droppable state of the item.
Returns
- NwItem
The newly cloned copy of the item.
Clone(Location, string?, bool)
Creates a copy of this game object.
public override NwItem Clone(Location location, string? newTag = null, bool copyLocalState = true)
Parameters
locationLocationThe location to create the cloned object.
newTagstringA new tag to assign the cloned object.
copyLocalStateboolIf true, will clone all local variables, effects, action queue and transition info (triggers, doors) for the object.
Returns
- NwItem
The newly cloned copy of the item.
Clone(Location, bool, string?, bool)
Creates a copy of this item.
public NwItem Clone(Location location, bool preserveDropFlag, string? newTag = null, bool copyLocalState = true)
Parameters
locationLocationThe location for the copied item.
preserveDropFlagboolIf true, preserves the Droppable state of the item.
newTagstringA new tag to assign the cloned item.
copyLocalStateboolIf true, local variables on the item are copied.
Returns
- NwItem
The newly cloned copy of the item.