private void CheckForChainEnd() { //Check if the chain needs to be scored if (Input.GetMouseButtonUp(0)) { if (mChain.Count > 0) { Debug.Log("Chain Ended"); //If there is a previous dot then score the chain if (mChain.Count > 1) { Debug.Log("Chain Scored"); for (int i = 0; i < mChain.Count; i++) { mChain[i].DotScored(); ReturnDotToPool(mChain[i]); } if (OnChainScoredEvent != null) { OnChainScoredEvent(); } } else { mChain[0].Selected = false; } for (int i = 0; i < mConnections.Count; i++) { mConnectionFactory.AddConnectionToPool(mConnections[i]); } mSquareMade = false; mChain.Clear(); mConnections.Clear(); } } }