Inheritance: MonoBehaviour
Esempio n. 1
0
    public virtual void handleMouseDown()
    {
        if(!enabled)
            return;

        try{
            getInventory().addItem(gameObject);
            if (this.gameObject.GetComponent<NoUnderground>()) {
                nucomp = this.gameObject.GetComponent<NoUnderground>();
                nucomp.enabled = false;
            }
            this.gameObject.transform.position = new Vector3(this.gameObject.transform.position.x,-10000f,this.gameObject.transform.position.z); //SetActiveRecursively(false);
        }catch(NullReferenceException e){

        }
    }
Esempio n. 2
0
    virtual public void handleMouseDown()
    {
        if (!enabled)
        {
            return;
        }

        try{
            getInventory().addItem(gameObject);
            if (this.gameObject.GetComponent <NoUnderground>())
            {
                nucomp         = this.gameObject.GetComponent <NoUnderground>();
                nucomp.enabled = false;
            }
            this.gameObject.transform.position = new Vector3(this.gameObject.transform.position.x, -10000f, this.gameObject.transform.position.z);           //SetActiveRecursively(false);
        }catch (NullReferenceException e) {
        }
    }