예제 #1
0
    // Use this for initialization
    void Start()
    {
        GameObject m_goHero = GameObject.FindGameObjectWithTag("Hero");
        HeroScript = m_goHero.GetComponent<Hero_Data>();

        GameObject m_goInventory = GameObject.FindGameObjectWithTag("inventory");
        InventoryScript = m_goInventory.GetComponent<Inventory>();

        GameObject m_goEquip_Items = GameObject.FindGameObjectWithTag("Equipment");
        Equip_ItemsScript = m_goEquip_Items.GetComponent<Equip_Items>();

        m_buttonItem.onClick.AddListener(()=>{OnClickOptions();});

        m_buttonSell.onClick.AddListener(()=>{OnClickSell();});

        m_buttonEquip.onClick.AddListener(()=>{OnClickEquip();});

        m_OptionButtons.SetActive(m_bShowOptions);
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        if(Equip == null)
        {
            Equip = this;
        }
        else if(Equip != this)
        {
            Destroy(gameObject);
        }

        GameObject m_goInventory = GameObject.FindGameObjectWithTag("inventory");
        InventoryScript = m_goInventory.GetComponent<Inventory>();

        m_transOrginalPos = gameObject.transform.localPosition;
        gameObject.transform.localPosition = m_transOffPos;

        Game_Info.GameInfo.LoadEquip();
    }