public void AfterViewDataChange(FogViewBaseData viewData) { float ratio = (float)viewData.array_real_h / mask_h; if (ratio < 1) { Enlarge(viewData.fixList, ratio); } else { Shrink(viewData.fixList, ratio); } fixGroup.DataCombo(); }
/// <summary> /// Initializes a new instance of the <see cref="T:BabelTime.GD.UI.BattleUISub.FogAbout.FogMaskData"/> class. /// </summary> /// <param name="w">遮罩图的实际宽度.</param> /// <param name="h">遮罩图的实际高度.</param> public FogMaskData(FogViewBaseData viewData, int w, int h) { this.mask_w = w; this.mask_h = h; this.view_array_w = viewData.array_w; this.view_array_h = viewData.array_h; big_index_x = mask_w % view_array_w; big_index_y = mask_h % view_array_h; default_length_x = mask_w / view_array_w; default_length_y = mask_h / view_array_h; fixGroup = new FogMaskFixGroup(); }
public FogKit(int world_w, int world_h, int view_w, int view_h, int mask_w, int mask_h) { baseData = new FogBaseData(world_w, world_h); viewData2 = new FogViewBaseData(view_w, view_h); maskData = new FogMaskData(viewData2, mask_w, mask_h); }