/// <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); }
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); } }
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); }
/// <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); }