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