void Start() { m_palette = GetComponent <PaletteRU>(); m_curTool = ToolType.Pencil; m_curBrush = BrushType.BrushHeart; m_buttonGroup[0].GetComponent <Image>().color = Color.yellow; m_buttonGroup[3].GetComponent <Image>().color = Color.red; m_left = ((float)Screen.width / 1920 * 1238); //(float)(Screen.width / i); m_down = ((float)Screen.height / 1080 * 654); //(float)(Screen.height / j); m_textureWidth = ((float)Screen.width / 1920 * 404); m_textureHeight = ((float)Screen.height / 1080 * 312); m_widthRatio = (m_textureWidth / m_foreGroundBgPic2D.width); m_heightRatio = (m_textureHeight / m_foreGroundBgPic2D.height); m_drawRect = new Rect(m_left, m_down, m_textureWidth, m_textureHeight);//new Rect(Screen.width / i, Screen.height / j, Screen.width / k, Screen.height / l); m_imagePencilFill.fillAmount = m_sliderPencil.value / 10; m_imageBrushFill.fillAmount = m_sliderBrush.value / 5; m_imageRubberFill.fillAmount = m_sliderRubber.value / 6; }
void Start() { m_draw = GetComponent <DrawRU>(); m_palette = GetComponent <PaletteRU>(); }