// Update is called once per frame void Update() { if (cScript.getTouchPos() != Vector2.zero) { color = colorWheel.GetPixel(Mathf.RoundToInt(cScript.getTouchPos().x * 365 + 365), Mathf.RoundToInt(cScript.getTouchPos().y * 365 + 365)); } selectedColor.SetColor("_Color", color); }
// Update is called once per frame void Update() { if (cScript.getTouchPos() != Vector2.zero) { //Debug.Log(startSize + Mathf.RoundToInt(cScript.getTouchPos().x * 0.8f * startSize)); strokeSize = startSize + Mathf.RoundToInt(cScript.getTouchPos().x * 0.8f * startSize); //transform.position = new Vector3(startXpos + cScript.getTouchPos().x * 0.1f, transform.position.y, transform.position.z); transform.localScale = new Vector3(0.00083333333f * strokeSize, 0.0005f, 0.00083333333f * strokeSize); } else { strokeSize = 24; } }