コード例 #1
0
        public void OnClick(LineEntity lineEntity)
        {
            var firstCell  = _storage.PowerEntityCellById[lineEntity.FirstEnd];
            var secondCell = _storage.PowerEntityCellById[lineEntity.SecondEnd];

            UndoPrevClick();

            firstCell.Highlighted  = true;
            secondCell.Highlighted = true;

            prevFirstCell  = firstCell;
            prevSecondCell = secondCell;
        }
コード例 #2
0
        public void UndoPrevClick()
        {
            if (prevFirstCell != null)
            {
                prevFirstCell.Highlighted = false;
                prevFirstCell             = null;
            }

            if (prevSecondCell != null)
            {
                prevSecondCell.Highlighted = false;
                prevSecondCell             = null;
            }
        }