本文整理汇总了C#中SFML.Graphics.RectangleShape.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# RectangleShape.Dispose方法的具体用法?C# RectangleShape.Dispose怎么用?C# RectangleShape.Dispose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SFML.Graphics.RectangleShape
的用法示例。
在下文中一共展示了RectangleShape.Dispose方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public void Draw(RenderTarget t)
{
t.Clear(new Color(65, 64, 60));
btnAddRoom.Draw(t, cursorMode == CursorMode.AddRoom);
btnAddDoor.Draw(t, cursorMode == CursorMode.AddDoor);
//btnLoad.Draw(t, false);
btnLoadBase.Draw(t, false);
btnLoadFloor.Draw(t, false);
btnOptions.Draw(t, false);
if (BaseTex != null)
btnToggleBase.Draw(t, drawBase);
if (FloorTex != null)
btnToggleFloor.Draw(t, drawFloor);
if (BaseTex != null || FloorTex != null)
btnMoveBG.Draw(t, cursorMode == CursorMode.PlaceBGCursor || cursorMode == CursorMode.PlacedBGCursor);
btnMoveGibs.Draw(t, cursorMode == CursorMode.PlaceGibsCursor || cursorMode == CursorMode.PlacedGibsCursor);
placeRoomCloaking.Draw(t, false);
placeRoomDoors.Draw(t, false);
placeRoomDrones.Draw(t, false);
placeRoomEngines.Draw(t, false);
placeRoomMedbay.Draw(t, false);
placeRoomOxygen.Draw(t, false);
placeRoomPilot.Draw(t, false);
placeRoomSensors.Draw(t, false);
placeRoomShields.Draw(t, false);
placeRoomTeleporter.Draw(t, false);
placeRoomWeapons.Draw(t, false);
if (BaseTex != null && drawBase)
{
BaseTex.Position = bgOffset + (new Vector2f(Game.ship.LayoutData.X_OFFSET, Game.ship.LayoutData.Y_OFFSET) * 35);
BaseTex.Draw(t, RenderStates.Default);
}
if (FloorTex != null && drawFloor)
{
FloorTex.Position = bgOffset + (new Vector2f(Game.ship.LayoutData.X_OFFSET, Game.ship.LayoutData.Y_OFFSET) * 35);
FloorTex.Draw(t, RenderStates.Default);
}
// Draw grid
foreach (FTLRoom room in ShipRooms)
t.Draw(room.drawer);
foreach (FTLDoor door in ShipDoors)
t.Draw(door.drawer);
for (int currentY = 1; currentY < 600; currentY += 35)
{
verts[0].Position = new Vector2f(0, currentY);
verts[1].Position = new Vector2f(GUIStartX, currentY);
t.Draw(verts, PrimitiveType.Lines);
}
for (int currentX = 0; currentX < GUIStartX; currentX += 35)
{
verts[0].Position = new Vector2f(currentX, 0);
verts[1].Position = new Vector2f(currentX, 600);
t.Draw(verts, PrimitiveType.Lines);
}
if (ship != null)
foreach (RoomFunc rf in ship.rooms.Values)
{
if (rf == null || rf.location == null)
continue;
Sprite temp = new Sprite(rf.image);
temp.Position = new Vector2f((rf.location.position.X + (((float)rf.location.size.X - 1) / 2)) * 35, (rf.location.position.Y + (((float)rf.location.size.Y - 1) / 2)) * 35);
temp.Position += (new Vector2f(Game.ship.LayoutData.X_OFFSET, Game.ship.LayoutData.Y_OFFSET) * 35);
t.Draw(temp);
temp.Dispose();
}
ViewOffsetter.Draw(t, rs);
if (cursorMode == CursorMode.AddDoor)
{
RectangleShape curDoor;
if (DoorHorizontal)
{
curDoor = new RectangleShape(new Vector2f(19, 4));
curDoor.Position = new Vector2f((SFML.Window.Mouse.GetPosition(Program.app).X / 35) * 35 + 7, (SFML.Window.Mouse.GetPosition(Program.app).Y / 35) * 35 - 2);
}
else
{
curDoor = new RectangleShape(new Vector2f(4, 19));
curDoor.Position = new Vector2f((SFML.Window.Mouse.GetPosition(Program.app).X / 35) * 35 - 2, (SFML.Window.Mouse.GetPosition(Program.app).Y / 35) * 35 + 7);
}
curDoor.FillColor = new Color(255, 150, 50);
curDoor.OutlineColor = new Color(0, 0, 0);
curDoor.OutlineThickness = 1;
t.Draw(curDoor);
curDoor.Dispose();
}
if (cursorMode == CursorMode.AddRoom)
{
//.........这里部分代码省略.........