Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public EditorGlobals GlobalAccess;
- public GameObject XY;
- public HoverHighlight[] XList;
- public HoverHighlight[] YList;
- // Update is called once per frame
- void Update ()
- {
- foreach (HoverHighlight Highlight in XList)
- {
- Highlight.IsOrientation = false;
- Highlight.IsSize = false;
- }
- foreach (HoverHighlight Highlight in YList)
- {
- Highlight.IsOrientation = false;
- Highlight.IsSize = false;
- }
- switch(GlobalAccess.OrientationSelected)
- {
- case EditorGlobals.Orientation.Horizontal:
- foreach (HoverHighlight Highlight in XList)
- Highlight.IsOrientation = true;
- break;
- case EditorGlobals.Orientation.Vertical:
- foreach (HoverHighlight Highlight in YList)
- Highlight.IsOrientation = true;
- break;
- }
- if (GlobalAccess.SizeSelected > 5)
- GlobalAccess.SizeSelected = 5;
- if (GlobalAccess.SizeSelected < 1)
- GlobalAccess.SizeSelected = 1;
- int index = 0;
- while (index < GlobalAccess.SizeSelected - 1)
- {
- XList[index].IsSize = true;
- YList[index].IsSize = true;
- index++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement