private void RaycastPentagrammonPoint() { Ray ray; if (_camera == null) { ray = new Ray { origin = transform.position, direction = transform.forward }; } else { ray = _camera.ScreenPointToRay(Input.mousePosition); } RaycastHit hit; if (Physics.Raycast(ray, out hit, distance, layerMask)) { PentagrammonPoint pentagrammonPoint = hit.collider.GetComponent <PentagrammonPoint>(); if (pentagrammonPoint != null) { PentagrammonManager.Instance.PointDrawn(pentagrammonPoint); } } }
public void PointDrawn(PentagrammonPoint pentagrammonPoint) { if (!isReady) { return; } uncheckedPentagrammonPoints.Remove(pentagrammonPoint); //pentagrammonPoint.GetComponent<MeshRenderer>().enabled = true; if (uncheckedPentagrammonPoints.Count == 0) { pentagramDrawn = true; if (OnPentagramDrawn != null) { OnPentagramDrawn.Invoke(); } } }