예제 #1
0
    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));
    }
예제 #2
0
 private void EndLine()
 {
     currentLine = null;
     onEndLine?.Invoke();
 }