SHARE
TWEET

Untitled

a guest Aug 8th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void Start()
  2.     {
  3.         ColorsScript.SetColor(new Color32(0, 0, 0, 255));
  4.         Select.GetComponent<RectTransform>().sizeDelta = new Vector2();
  5.  
  6.         SelectPanel(0);
  7.  
  8.         //for (int i = 0; i < ToolsGroup.GetComponentsInChildren<Toggle>().Length; i++)
  9.         //{
  10.         //  ToolsList.Add(ToolsGroup.GetComponentsInChildren<Toggle>()[i]);
  11.         //}
  12.         ToolsList = ToolsGroup.GetComponentsInChildren<Toggle>().ToList();
  13.  
  14.         for (int i = 0; i < ToolsList.Count; i++)
  15.         {
  16.             ToolsList[i].onValueChanged.AddListener(on =>
  17.             {
  18.                 if (on)
  19.                 {
  20.                     toolId = i;
  21.                     //SelectPanel(toolId);
  22.                 }
  23.             });
  24.         }
  25.  
  26.         /*------------------------------ Pencil Start ------------------------------*/
  27.         if (Mathf.Max(WorkshopScript.pixelsCountX, WorkshopScript.pixelsCountY) > 100)
  28.         {
  29.             PencilSize.maxValue = 100;
  30.         }
  31.         else
  32.         {
  33.             PencilSize.maxValue = Mathf.Max(WorkshopScript.pixelsCountX, WorkshopScript.pixelsCountY);
  34.         }
  35.  
  36.         if (Mathf.Max(WorkshopScript.pixelsCountX * My.Percent(percent), WorkshopScript.pixelsCountY * My.Percent(percent)) < 1)
  37.         {
  38.             PencilSize.value = 1;
  39.         }
  40.         else
  41.         {
  42.             PencilSize.value = Mathf.Max(WorkshopScript.pixelsCountX * My.Percent(percent), WorkshopScript.pixelsCountY * My.Percent(percent));
  43.         }
  44.         PencilSizeUpdate();
  45.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top