void OnMouseDown() { returnSmith.SetActive(true); LengthenUI.SetActive(false); GameObject bookShelf = GameObject.FindGameObjectWithTag("BookShelf"); Collider2D toEnable = bookShelf.GetComponent <Collider2D>(); toEnable.enabled = true; mainCharacterScript = (MainCharacterSmithyScript)returnSmith.GetComponent(typeof(MainCharacterSmithyScript)); mainCharacterScript.setIsSmithing(false); gameObject.SetActive(false); }
// Use this for initialization void Start() { GameObject mainCharacter = GameObject.FindGameObjectWithTag("MainCharacterShop"); mainCharacterScript = (MainCharacterSmithyScript)mainCharacter.GetComponent(typeof(MainCharacterSmithyScript)); }