void Awake() { if(this.parentNode != null) return; var temp = this.transform.parent.gameObject.GetComponent<WarpBlock>() as WarpBlock; if(temp == null) return; this.parentNode = temp; this.warpNode = parentNode.warpNode; this.warpNodeCollider = this.warpNode.transform.GetChild(0).GetComponent<BoxCollider>(); }
void Awake() { if (this.parentNode != null) { return; } var temp = this.transform.parent.gameObject.GetComponent <WarpBlock>() as WarpBlock; if (temp == null) { return; } this.parentNode = temp; this.warpNode = parentNode.warpNode; this.warpNodeCollider = this.warpNode.transform.GetChild(0).GetComponent <BoxCollider>(); }