public OSDot(Vector2I I_pos, char I_color, bool I_IfDisplay = true) { pos = I_pos; color = I_color; Display = I_IfDisplay; CurrentParent = Array_PixelSet[I_pos.X, I_pos.Y]; }
public void OSMoveDot(Vector2I I_target) { pos = I_target; if (CurrentParent != null) { CurrentParent.L_DotSet.Remove(this); } if (!OSCheckDotIfEdge(I_target)) { CurrentParent = null; return; } CurrentParent = Array_PixelSet[I_target.X, I_target.Y]; CurrentParent.L_DotSet.Insert(0, this); }
public static void OSInitialDisplay() { L_ControlList = new List <OSControl>(); //L_TempDots = new List<OSDot>(); //L_StaticDots = new List<OSDot>(); //L_BackGroundDots = new List<OSDot>(); //填充背景 for (int Y = 0; Y < ODisplayHeight; Y++) { for (int X = 0; X < ODisplayWidth; X++) { L_BackGroundDots.Add(new OSDot(new Vector2I(X, Y), OBackgroundColor, true)); Array_PixelSet[X, Y] = new OSPixel(new Vector2I(X, Y), L_BackGroundDots[L_BackGroundDots.Count - 1]); } } }