void Awake() { if(this.parentNode != null) return; var temp = this.transform.parent.gameObject.GetComponent<GlassBlock>() as GlassBlock; if(temp == null) return; this.parentNode = temp; this.parentNode.glassBlock = this.gameObject; this.blockCollider = this.transform.GetComponent<BoxCollider>() as BoxCollider; }
void Awake() { if (this.parentNode != null) { return; } var temp = this.transform.parent.gameObject.GetComponent <GlassBlock>() as GlassBlock; if (temp == null) { return; } this.parentNode = temp; this.parentNode.glassBlock = this.gameObject; this.blockCollider = this.transform.GetComponent <BoxCollider>() as BoxCollider; }