// Update is called once per frame void Update() { if (Input.GetMouseButton(0)) { painter.Drawing(Input.mousePosition); checker.Drawing(Input.mousePosition); print(checker.Progress); } else if (Input.GetMouseButtonUp(0)) { painter.EndDraw(); checker.EndDraw(); } }
// Update is called once per frame void Update() { if (Input.GetMouseButton(0)) { _painter.Drawing(Input.mousePosition, Camera.main, true); _completeChecker.Drawing(Input.mousePosition); Vector2 size = proBar.sizeDelta; size.x = _completeChecker.Progress * 300f; proBar.sizeDelta = size; proTex.text = "Progress:" + _completeChecker.Progress * 100f + "%"; } else if (Input.GetMouseButtonUp(0)) { _painter.EndDraw(); _completeChecker.EndDraw(); } }
// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { if (painter && m_clickDraw) { painter.ClickDraw(Input.mousePosition); if (enableCheckComplete && checker) { checker.ClickDraw(Input.mousePosition); } } } if (Input.GetMouseButton(0)) { if (painter) { if (!m_clickDraw) { painter.Drawing(Input.mousePosition); } } if (enableCheckComplete && checker) { checker.Drawing(Input.mousePosition); } } if (Input.GetMouseButtonUp(0)) { if (painter) { painter.EndDraw(); } if (enableCheckComplete && checker) { checker.EndDraw(); } } }
void Update() { if (canDraw) { if (Input.GetMouseButton(0)) { painter.Drawing(Input.mousePosition); checker.Drawing(Input.mousePosition); if (checker.Progress >= 0.2f) { if (OnPaintComplete != null) { canDraw = false; OnPaintComplete(); } } } if (Input.GetMouseButtonUp(0)) { painter.EndDraw(); checker.EndDraw(); } } }