Esempio n. 1
0
 //是否存在指定数值的单元
 public bool isValueExist(int value)
 {
     for (int i = 0; i < this.getElementCount(); i++)
     {
         TilePhysicsElement element = (TilePhysicsElement)PhyTilesList[i];
         if (element != null && element.getFlagInf() == value)
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 2
0
 //返回指定参数值的单元
 public TilePhysicsElement getElemWithValue(byte value)
 {
     for (int i = 0; i < this.getElementCount(); i++)
     {
         TilePhysicsElement element = (TilePhysicsElement)PhyTilesList[i];
         if (element != null && element.getFlagInf() == value)
         {
             return(element);
         }
     }
     return(null);
 }
 //设置地图单元
 public static void configElement(TilePhysicsElement elementT)
 {
     if (elementT == null)
     {
         Console.WriteLine("error in configElement");
         return;
     }
     manager = elementT.tilePhysicsManager;
     element = elementT;
     SmallDialog_NewTile_Physics dialog = new SmallDialog_NewTile_Physics("设置物理单元属性");
     dialog.numericUpDown_FlagInf.Value = element.getFlagInf();
     dialog.panel_MapColor.BackColor = GraphicsUtil.getColor(element.getColor());
     dialog.ShowDialog();
 }
Esempio n. 4
0
        //设置地图单元
        public static void configElement(TilePhysicsElement elementT)
        {
            if (elementT == null)
            {
                Console.WriteLine("error in configElement");
                return;
            }
            manager = elementT.tilePhysicsManager;
            element = elementT;
            SmallDialog_NewTile_Physics dialog = new SmallDialog_NewTile_Physics("设置物理单元属性");

            dialog.numericUpDown_FlagInf.Value = element.getFlagInf();
            dialog.panel_MapColor.BackColor    = GraphicsUtil.getColor(element.getColor());
            dialog.ShowDialog();
        }