Пример #1
0
 /// <summary>
 /// set delegates to be used to subscribe to GridPointMatrix events
 /// </summary>
 private void SetEventDelegates()
 {
     firstCRDel         = new SourceGridPointChangedEventHandler(_MatrixColRowChanged);
     visChgDel          = new VisibleChangedEventHandler(_MatrixVisibleChanged);
     gridPtSzDel        = new GridPointSizeChangedEventHandler(_GridPointSizeChanged);
     refQueueDel        = new RefreshQueueAreaAddedEventHandler(_RefreshQueueNewArea);
     wrappingDel        = new GridPointMatrixWrappingChangedEventHandler(_GridPointMatrixWrappingChanged);
     matrixDisposingDel = new GridPointMatrixDisposingEventHandler(_GridPointMatrixDisposing);
 }
Пример #2
0
        protected void InitValues(GridPoint[][] pt, int width, int height, float layerSyncModifier, bool addToInstances)
        {
            _matrix            = pt;
            _layerSyncModifier = layerSyncModifier;
            _tileWidth         = width;
            _tileHeight        = height;
            _visible           = true;
            _gridPtZeroPxl     = new Point(0, 0);
            // let each GridPoint in array know its position in the array
            SaveGridCoordinatesToGridPoints();
            RefreshQueue = new RefreshQueue(this);
            refQueueDel  = new RefreshQueueAreaAddedEventHandler(RefreshQueueNewTile);
            RefreshQueue.RefreshQueueAreaAdded += refQueueDel;
            FindIndexedGridPoint = new GetIndexer(GetIndexer_NoWrap);
            _movement            = new Movement(this);

            if (addToInstances)
            {
                _allGridPointMatrix.Add(this);
            }
        }
Пример #3
0
        protected void InitValues(GridPoint[][] pt, int width, int height, float layerSyncModifier, bool addToInstances)
        {
            _matrix = pt;
            _layerSyncModifier = layerSyncModifier;
            _tileWidth = width;
            _tileHeight = height;
            _visible = true;
            _gridPtZeroPxl = new Point(0, 0);
            // let each GridPoint in array know its position in the array
            SaveGridCoordinatesToGridPoints();
            RefreshQueue = new RefreshQueue(this);
            refQueueDel = new RefreshQueueAreaAddedEventHandler(RefreshQueueNewTile);
            RefreshQueue.RefreshQueueAreaAdded += refQueueDel;
            FindIndexedGridPoint = new GetIndexer(GetIndexer_NoWrap);
            _movement = new Movement(this);

            if (addToInstances)
                _allGridPointMatrix.Add(this);
        }
Пример #4
0
 /// <summary>
 /// set delegates to be used to subscribe to GridPointMatrix events
 /// </summary>
 private void SetEventDelegates()
 {
     firstCRDel = new SourceGridPointChangedEventHandler(_MatrixColRowChanged);
     visChgDel = new VisibleChangedEventHandler(_MatrixVisibleChanged);
     gridPtSzDel = new GridPointSizeChangedEventHandler(_GridPointSizeChanged);
     refQueueDel = new RefreshQueueAreaAddedEventHandler(_RefreshQueueNewArea);
     wrappingDel = new GridPointMatrixWrappingChangedEventHandler(_GridPointMatrixWrappingChanged);
     matrixDisposingDel = new GridPointMatrixDisposingEventHandler(_GridPointMatrixDisposing);
 }