// Update is called once per frame void Update() { if (wireManager.IsInWireEditMode()) { if (!isShowingLocalWire) { //Start showing a local wire isShowingLocalWire = true; } } else { if (isShowingLocalWire) { Reset(); } } //Draw the Wire if (isShowingLocalWire) { List <CellCoordinates> wirePath = wireManager.GetCurrentPath(); if (localWire == null || localWire.Count != wirePath.Count) { //We've changed somewhere GenerateWire(wirePath); } else { for (int i = 0; i < wirePath.Count; i++) { //Check for changes if (localWire[i].X != wirePath[i].X || localWire[i].Y != wirePath[i].Y) { //We've changed somewhere GenerateWire(wirePath); } } } } }