void Awake() { uButton = GetComponent<dfButton>(); mResizableProp = gameObject.transform.parent.parent.GetComponent<ResizableProp>(); // dfButton myButton = gameObject.GetComponent<dfButton>(); // // Figure out which corner we are // foreach(ResizableCorner c in gameObject.transform.parent.GetComponentsInChildren<ResizableCorner>()) { // dfButton d = c.gameObject.GetComponent<dfButton>(); // if (d.Position.x != myButton.Position.x && d.Position.y != myButton.Position.y) { // // This is the opposite corner // uOppositeCorner = c; // break; // } // } }
void Awake() { uButton = GetComponent <dfButton>(); mResizableProp = gameObject.transform.parent.parent.GetComponent <ResizableProp>(); // dfButton myButton = gameObject.GetComponent<dfButton>(); // // Figure out which corner we are // foreach(ResizableCorner c in gameObject.transform.parent.GetComponentsInChildren<ResizableCorner>()) { // dfButton d = c.gameObject.GetComponent<dfButton>(); // if (d.Position.x != myButton.Position.x && d.Position.y != myButton.Position.y) { // // This is the opposite corner // uOppositeCorner = c; // break; // } // } }