Inheritance: MonoBehaviour
Exemple #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){

        }
    }
Exemple #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) {
        }
    }