private void MakeRuleArguments(int indexOffSetX, int indexOffSetY) { RuleHelper ruleHelper = new RuleHelper(); foreach (SerializedRuleTile tileData in serializedTiles) { tileParams.Add(new TileParameter(new Index ( tileData.PositionIndexX - indexOffSetX, tileData.PositionIndexY - indexOffSetY ), new object[] { new Vector2(tileData.PositionIndexX * tileEngine.TileSize.Width, tileData.PositionIndexY * tileEngine.TileSize.Height), ruleHelper.GetRuleByName(tileData.RuleName) })); } }