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);
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        GameObject mainCharacter = GameObject.FindGameObjectWithTag("MainCharacterShop");

        mainCharacterScript = (MainCharacterSmithyScript)mainCharacter.GetComponent(typeof(MainCharacterSmithyScript));
    }