本文整理汇总了C#中HaCreator.MapEditor.Board类的典型用法代码示例。如果您正苦于以下问题:C# Board类的具体用法?C# Board怎么用?C# Board使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Board类属于HaCreator.MapEditor命名空间,在下文中一共展示了Board类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ClearBoundItems
public static void ClearBoundItems(Board board)
{
object[] keys = new object[board.Mouse.BoundItems.Count];
//int i = 0;
board.Mouse.BoundItems.Keys.CopyTo(keys, 0);
/*foreach (DictionaryEntry entry in board.Mouse.BoundItems)
{
keys[i] = entry.Key;
i++;
}*/
List<UndoRedoAction> undoActions = new List<UndoRedoAction>();
bool addUndo;
foreach (object key in keys)
{
BoardItem item = (BoardItem)key;
addUndo = item.tempParent == null || !(item.tempParent.Parent is Mouse);
board.Mouse.ReleaseItem(item);
if (addUndo)
{
if ((item is BackgroundInstance) && (((BackgroundInstance)item).BaseX != item.moveStartPos.X || ((BackgroundInstance)item).BaseY != item.moveStartPos.Y))
undoActions.Add(UndoRedoManager.BackgroundMoved((BackgroundInstance)item, new Point(item.moveStartPos.X, item.moveStartPos.Y), new Point(((BackgroundInstance)item).BaseX, ((BackgroundInstance)item).BaseY)));
else if (!(item is BackgroundInstance) && (item.X != item.moveStartPos.X || item.Y != item.moveStartPos.Y))
undoActions.Add(UndoRedoManager.ItemMoved(item, new Point(item.moveStartPos.X, item.moveStartPos.Y), new Point(item.X, item.Y)));
}
}
if (undoActions.Count > 0)
board.UndoRedoMan.AddUndoBatch(undoActions);
}
开发者ID:johnnyeven,项目名称:hasuite,代码行数:28,代码来源:InputHandler.cs
示例2: ClearSelectedItems
public static void ClearSelectedItems(Board board)
{
while (board.SelectedItems.Count > 0)
{
board.SelectedItems[0].Selected = false;
}
}
开发者ID:johnnyeven,项目名称:hasuite,代码行数:7,代码来源:InputHandler.cs
示例3: Layer
public Layer(Board board)
{
this.board = board;
if (board.Layers.Count == 10) throw new NotSupportedException("Cannot add more than 10 layers (why would you need that much anyway?)");
num = board.Layers.Count;
board.Layers.Add(this);
}
开发者ID:ilvmoney,项目名称:hasuite-new,代码行数:7,代码来源:Layer.cs
示例4: MassZmEditor
public MassZmEditor(IContainsLayerInfo[] items, Board board, int zm)
{
InitializeComponent();
this.items = items;
this.board = board;
zmInput.Value = zm;
}
开发者ID:kokose1234,项目名称:HaSuite,代码行数:7,代码来源:MassZmEditor.cs
示例5: BoardItemContextMenu
public BoardItemContextMenu(MultiBoard multiboard, Board board, BoardItem target)
{
this.multiboard = multiboard;
this.board = board;
this.target = target;
this.cms = null;
}
开发者ID:kokose1234,项目名称:HaSuite,代码行数:7,代码来源:BoardItemContextMenu.cs
示例6: GenerateDefaultZms
public static void GenerateDefaultZms(Board mapBoard)
{
// generate default zM's
HashSet<int> allExistingZMs = new HashSet<int>();
foreach (Layer l in mapBoard.Layers)
{
l.RecheckTileSet();
l.RecheckZM();
l.zMList.ToList().ForEach(y => allExistingZMs.Add(y));
}
for (int i = 0; i < mapBoard.Layers.Count; i++)
{
for (int zm_cand = 0; mapBoard.Layers[i].zMList.Count == 0; zm_cand++)
{
// Choose a zM that is free
if (!allExistingZMs.Contains(zm_cand))
{
mapBoard.Layers[i].zMList.Add(zm_cand);
allExistingZMs.Add(zm_cand);
break;
}
}
}
}
开发者ID:kokose1234,项目名称:HaSuite,代码行数:25,代码来源:MapLoader.cs
示例7: BoardItemsManager
public BoardItemsManager(Board board)
{
AllItemLists = new IMapleList[] { BackBackgrounds, TileObjs, Mobs, NPCs, Reactors, Portals, FrontBackgrounds, FootholdLines, RopeLines, FHAnchors, RopeAnchors, Chairs, CharacterToolTips, ToolTips, ToolTipDots, MiscItems, SpecialDots };
this.board = board;
Items = new BoardItemsCollection(this, true);
Lines = new MapleLinesCollection(this, false);
}
开发者ID:kokose1234,项目名称:HaSuite,代码行数:7,代码来源:BoardItemsManager.cs
示例8: TnSelector
public TnSelector(Board board)
{
InitializeComponent();
foreach (PortalInstance pi in board.BoardItems.Portals)
{
if (pi.pn != null && pi.pn != "" && pi.pn != "sp" && pi.pn != "pt")
pnList.Items.Add(pi.pn);
}
}
开发者ID:kokose1234,项目名称:HaSuite,代码行数:10,代码来源:PnSelector.cs
示例9: TnSelector
public TnSelector(Board board)
{
InitializeComponent();
styleManager.ManagerStyle = UserSettings.applicationStyle;
foreach (PortalInstance pi in board.BoardItems.Portals)
{
if (pi.pn != null && pi.pn != "" && pi.pn != "sp" && pi.pn != "pt")
pnList.Items.Add(pi.pn);
}
}
开发者ID:hanistory,项目名称:hasuite,代码行数:12,代码来源:PnSelector.cs
示例10: checkConnected
public static void checkConnected(Board mapBoard)
{
/*\
* This is not used yet, I was making it for putting the FHs in separate groups
* but lost my train of thought -DeathRight
\*/
foreach (FootholdLine fhline in mapBoard.BoardItems.FootholdLines)
{
foreach (FootholdLine connectedLine in fhline.FirstDot.connectedLines)
{
}
}
}
开发者ID:ilvmoney,项目名称:hasuite-new,代码行数:14,代码来源:Saver.cs
示例11: VREditor
public VREditor(Board mapBoardd)
{
InitializeComponent();
styleManager.ManagerStyle = UserSettings.applicationStyle;
mapBoard = mapBoardd;
VROld = (Rectangle)mapBoard.MapInfo.VR;
miniMap.Image = mapBoardd.MiniMap;
miniMap.Update();
miniMap.Refresh();
//Rectangle VR = new Rectangle(miniMap.Location.X - (mapBoard.MapInfo.VR.Value.X / 4), miniMap.Location.Y - (mapBoard.MapInfo.VR.Value.Y / 4), miniMap.Width - (mapBoard.MapInfo.VR.Value.Width / 4), miniMap.Height - (mapBoard.MapInfo.VR.Value.Height / 4));
//VR.Location = miniMap.Location;
}
开发者ID:ilvmoney,项目名称:hasuite-new,代码行数:15,代码来源:VREditor.cs
示例12: Save
public Save(Board board)
{
this.board = board;
InitializeComponent();
switch (board.MapInfo.mapType)
{
case MapType.CashShopPreview:
case MapType.MapLogin:
idBox.Text = board.MapInfo.strMapName;
break;
case MapType.RegularMap:
idBox.Text = board.MapInfo.id == -1 ? "" : board.MapInfo.id.ToString();
break;
default:
throw new NotSupportedException("Unknown map type at Save::.ctor()");
}
idBox_TextChanged(null, null);
}
开发者ID:kokose1234,项目名称:HaSuite,代码行数:18,代码来源:Save.cs
示例13: ObjectInstance
//private int zM;
public ObjectInstance(ObjectInfo baseInfo, Layer layer, Board board, int x, int y, int z, MapleBool r, MapleBool hide, MapleBool reactor, MapleBool flow, int? rx, int? ry, int? cx, int? cy, string name, string tags, List<ObjectInstanceQuest> questInfo, bool flip, bool beforeAdding)
: base(board, layer, x, y, z, beforeAdding)
{
this.baseInfo = baseInfo;
this.flip = flip;
this._r = r;
this.name = name;
this._hide = hide;
this._reactor = reactor;
this._flow = flow;
this._rx = rx;
this._ry = ry;
this._cx = cx;
this._cy = cy;
this._tags = tags;
this.questInfo = questInfo;
//this.zM = zM;
if (flip)
X -= Width - 2 * Origin.X;
}
开发者ID:hanistory,项目名称:hasuite,代码行数:22,代码来源:MapleInstance.cs
示例14: MiscRectangle
public MiscRectangle(Board board, Rectangle rect)
: base(board, rect)
{
PointA = new MiscDot(this, board, rect.Left, rect.Top, false);
PointB = new MiscDot(this, board, rect.Right, rect.Top, false);
PointC = new MiscDot(this, board, rect.Right, rect.Bottom, false);
PointD = new MiscDot(this, board, rect.Left, rect.Bottom, false);
board.BoardItems.ToolTipDots.Add((ToolTipDot)PointA);
board.BoardItems.ToolTipDots.Add((ToolTipDot)PointB);
board.BoardItems.ToolTipDots.Add((ToolTipDot)PointC);
board.BoardItems.ToolTipDots.Add((ToolTipDot)PointD);
LineAB = new MiscLine(board, PointA, PointB);
LineBC = new MiscLine(board, PointB, PointC);
LineCD = new MiscLine(board, PointC, PointD);
LineDA = new MiscLine(board, PointD, PointA);
LineAB.yBind = true;
LineBC.xBind = true;
LineCD.yBind = true;
LineDA.xBind = true;
}
开发者ID:hanistory,项目名称:hasuite,代码行数:20,代码来源:MiscItems.cs
示例15: LayerChange
public LayerChange(List<BoardItem> items, Board board)
{
this.items = items;
this.board = board;
InitializeComponent();
board.Layers.ForEach(x => layerBox.Items.Add(x.ToString()));
if (board.SelectedLayerIndex == -1)
{
layerBox.SelectedIndex = 0;
zmBox.SelectedIndex = 0;
}
else
{
layerBox.SelectedIndex = board.SelectedLayerIndex;
if (board.SelectedPlatform != -1)
{
zmBox.SelectedItem = board.SelectedPlatform;
}
}
}
开发者ID:kokose1234,项目名称:HaSuite,代码行数:21,代码来源:LayerChange.cs
示例16: MapSimulator
public MapSimulator(Board mapBoard)
{
if (Program.InfoManager.BGMs.ContainsKey(mapBoard.MapInfo.bgm))
audio = new WzMp3Streamer(Program.InfoManager.BGMs[mapBoard.MapInfo.bgm], true);
mapCenter = mapBoard.CenterPoint;
minimapPos = new Point((int)Math.Round((mapBoard.MinimapPosition.X + mapCenter.X) / (double)mapBoard.mag), (int)Math.Round((mapBoard.MinimapPosition.Y + mapCenter.Y) / (double)mapBoard.mag));
if (mapBoard.VRRectangle == null) vr = new Rectangle(0, 0, mapBoard.MapSize.X, mapBoard.MapSize.Y);
else vr = new Rectangle(mapBoard.VRRectangle.X + mapCenter.X, mapBoard.VRRectangle.Y + mapCenter.Y, mapBoard.VRRectangle.Width, mapBoard.VRRectangle.Height);
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);
InitializeComponent();
width = UserSettings.XGAResolution ? 1024 : 800;
height = UserSettings.XGAResolution ? 768 : 600;
this.Width = width;
this.Height = height;
#if FULLSCREEN
pParams.BackBufferWidth = Math.Max(Width, 1);
pParams.BackBufferHeight = Math.Max(Height, 1);
pParams.BackBufferFormat = SurfaceFormat.Color;
pParams.IsFullScreen = false;
pParams.DepthStencilFormat = DepthFormat.Depth24;
#else
pParams.BackBufferWidth = Math.Max(width, 1);
pParams.BackBufferHeight = Math.Max(height, 1);
pParams.BackBufferFormat = SurfaceFormat.Color;
pParams.DepthStencilFormat = DepthFormat.Depth24;
pParams.DeviceWindowHandle = Handle;
pParams.IsFullScreen = false;
#endif
DxDevice = MultiBoard.CreateGraphicsDevice(pParams);
this.minimap = BoardItem.TextureFromBitmap(DxDevice, mapBoard.MiniMap);
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(1, 1);
bmp.SetPixel(0, 0, System.Drawing.Color.White);
pixel = BoardItem.TextureFromBitmap(DxDevice, bmp);
sprite = new SpriteBatch(DxDevice);
}
开发者ID:kokose1234,项目名称:HaSuite,代码行数:36,代码来源:MapSimulator.cs
示例17: CreateInstance
public override BoardItem CreateInstance(Layer layer, Board board, int x, int y, int z, bool flip, bool beforeAdding)
{
if (Image == null) ParseImage();
return new ReactorInstance(this, board, x, y, UserSettings.defaultReactorTime, "", flip, beforeAdding);
}
开发者ID:hanistory,项目名称:hasuite,代码行数:5,代码来源:MapleInfo.cs
示例18: ParseOffsets
public void ParseOffsets(TileInstance instance, Board board, Layer layer, int x, int y)
{
List<FootholdAnchor> anchors = new List<FootholdAnchor>();
foreach (XNA.Point foothold in footholdOffsets)
{
FootholdAnchor anchor = new FootholdAnchor(board, x + foothold.X, y + foothold.Y, layer.LayerNumber, false);
anchors.Add(anchor);
board.BoardItems.FHAnchors.Add(anchor);
instance.BindItem(anchor, foothold);
}
for (int i = 0; i < anchors.Count - 1; i++)
{
FootholdLine fh = new FootholdLine(board, anchors[i], anchors[i + 1]);
board.BoardItems.FootholdLines.Add(fh);
}
}
开发者ID:hanistory,项目名称:hasuite,代码行数:16,代码来源:MapleInfo.cs
示例19: Mouse
public Mouse(Board board)
: base(board, 0, 0, false)
{
IsDown = false;
}
开发者ID:hanistory,项目名称:hasuite,代码行数:5,代码来源:Mouse.cs
注:本文中的HaCreator.MapEditor.Board类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论