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