void OnCollisionEnter(Collision col) { Enchantable e = col.gameObject.GetComponent <Enchantable>(); if (e != null) { e.disenchant(); } }
void OnTriggerEnter(Collider col) { Enchantable e = col.gameObject.GetComponent <Enchantable>(); if (e != null) { e.disenchant(); } }
public void absorbSpell(GameObject target) { SetHidden(false); Enchantable enchantable = (target.GetComponent("Enchantable") as Enchantable); if (enchantable == null) { SetHidden(false); return; } string file_name = enchantable.disenchant(); //string file_name = enchantable.getJune().getFileName(); setCurrentFile(file_name); }