public override void MoveToInventoryEvent() { if (linked != null) { GameObject clonelinkedspell = Object.Instantiate(linked.gameObject); clonelinkedspell.name = ObjectInteraction.UniqueObjectName(clonelinkedspell.GetComponent <ObjectInteraction>()); clonelinkedspell.gameObject.transform.parent = GameWorldController.instance.InventoryMarker.transform; linked = clonelinkedspell.GetComponent <ObjectInteraction>(); } }
public override void MoveToInventoryEvent() { if (objInt().enchantment == 0) { //Object links to a spell. if (linkedspell != null) { GameObject clonelinkedspell = Object.Instantiate(linkedspell.gameObject); clonelinkedspell.name = ObjectInteraction.UniqueObjectName(clonelinkedspell.GetComponent <ObjectInteraction>()); clonelinkedspell.gameObject.transform.parent = GameWorldController.instance.InventoryMarker.transform; linkedspell = clonelinkedspell.GetComponent <a_spell>(); //GameWorldController.MoveToInventory(clonelinkedspell.gameObject); } } }
public override void MoveToInventoryEvent() { if (enchantment == 0) { //Object links to a spell object if (linkedspell != null) { GameObject clonelinkedspell = Object.Instantiate(linkedspell.gameObject); clonelinkedspell.name = ObjectInteraction.UniqueObjectName(clonelinkedspell.GetComponent <ObjectInteraction>()); clonelinkedspell.gameObject.transform.parent = GameWorldController.instance.InventoryMarker.transform; linkedspell = clonelinkedspell.GetComponent <a_spell>(); //COpy data from original to new ObjectInteraction.CopyStaticProperties(linkedspell.objInt(), clonelinkedspell.GetComponent <ObjectInteraction>()); } } }
void SplitLightSourceIntoSlot() { GameObject split = Instantiate(this.gameObject); split.name = ObjectInteraction.UniqueObjectName(split.GetComponent <ObjectInteraction>()); //split.name + "_" + UWCharacter.Instance.summonCount++; split.GetComponent <ObjectInteraction> ().link = 1; //Increment and decrement the object count as appropiate; link--; if (link < 0) { link = 0; } split.transform.parent = this.transform.parent; //Activate the split instead split.GetComponent <ObjectInteraction> ().Use(); split.GetComponent <ObjectInteraction> ().isquant = 1; }