public void OnPointerClick(PointerEventData eventData) { if (_dragging || Input.touchCount > 1 || eventData.button != PointerEventData.InputButton.Left) { return; } if (nextClickOverride != null) { nextClickOverride(); nextClickOverride = null; return; } Utils.GetInputCoords(out var x, out var y); if (FieldMatrix.Get(x, y, out var block)) { block.logic.Click(eventData); } else { PixelDriver.Add(PixelRoad.Circle(Colors.GetPalette(-1)[3], 3f, 3f, 0.05f, 0.5f, x, y).SetWeight(0.05f)); } }
void OnEnable() { Instance = this; OnNextFrame += LoadFromMemoryOrFile; PixelDriver.Add(PixelRoad.Checkerboard(Color.white, new Color(0.97f, 0.97f, 0.97f)).SetWeight(0.3f)); PixelDriver.Add(PixelRoad.NodeBackground().SetWeight(0.1f)); }
void OnPulseDeadEnd(Block from) { if (from == null || BindMatrix.GetOutBindsCount(this) != 0) { return; } var dir = Utils.DirFromCoords(logic.Position - from.logic.Position); var root = Roots.Root[rootId].block; root.soundsPlayer.Play(dir); PixelDriver.Add(PixelRoad.Circle(root.view.PrimaryPainter.palette.GetColor(dir), 2f, 3f, 0.05f, 0.5f, logic.X, logic.Y).SetWeight(0.3f)); }