private void StartLine(Vector2 touchPosition) { charges--; onChargesChangePassCharges?.Invoke(charges); onStartLine?.Invoke(); GameObject pencilLineObj = ObjectPooler.Spawn(lineTag, PencilLinesHolder.Tr); currentLine = pencilLineObj.GetComponent <PencilLine>(); currentLine.UpdateLine(cam.ScreenToWorldPoint(touchPosition)); }
private void EndLine() { currentLine = null; onEndLine?.Invoke(); }