//-----------------------------------------------------------------------------------------------------------// /// <summary> /// Generic class for calling an action for all the neighbours /// </summary> /// <typeparam name="T"> Generic tileGoData type </typeparam> /// <param name="_tileToCheck"> The tile we want to check the neighbours around </param> /// <param name="_action"> The action we want to call on the neighbours </param> private void TileCheckNeighbours <T>(TileGOData _tileToCheck, System.Action <T> _action) where T : TileGOData { _action(_tileToCheck.Up <T>()); _action(_tileToCheck.Right <T>()); _action(_tileToCheck.Down <T>()); _action(_tileToCheck.Left <T>()); }