private void ResetEnteredSet() { mouseTrackerEnteredSet.Clear(); for (int i = 0; i < mouseTrackerFullSet.Count; i++) { if (mouseTrackerFullSet[i].containsMousePoint) { mouseTrackerEnteredSet.Add(mouseTrackerFullSet[i]); } } }
private void Update() { Vector3 mouseCalcPos = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.0f)); mousePos.CurrentValue = new Vector2(mouseCalcPos.x, mouseCalcPos.y); if (prevPos != mousePos.CurrentValue) { prevPos = mousePos.CurrentValue; if (MouseMoveCalls != null) { MouseMoveCalls(mousePos.CurrentValue); } } if (Input.GetMouseButtonDown(0)) { ResetMouseDownDelegate(); if (MouseDownCalls != null) { MouseDownCalls(mousePos.CurrentValue); } } if (Input.GetMouseButtonUp(0)) { ResetMouseUpDelegate(); if (MouseUpCalls != null) { MouseUpCalls(mousePos.CurrentValue); } mouseTrackerLinkedSet.Clear(); } // TODO: Delete when debugging lists no longer required DrawLayerMngr.Update(mouseTrackerFullSet, mouseTrackerEnteredSet); }