本文整理汇总了C#中Core.NewGame方法的典型用法代码示例。如果您正苦于以下问题:C# Core.NewGame方法的具体用法?C# Core.NewGame怎么用?C# Core.NewGame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core.NewGame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Form1
public Form1()
{
InitializeComponent();
core = new Core();
core.onWin += Win;
core.NewGame(Core.Mode.Easy);
stepsLabel.Text = core.steps.ToString();
bgc = new BufferedGraphicsContext();
fon = new Bitmap(567, 567);
for (int i = 0; i < 567; i++)
for (int j = 0; j < 567; j++)
fon.SetPixel(i, j, Color.FromArgb(
0,
102 + (int)Math.Round(Math.Sqrt((i - 283.5) * (i - 283.5) + (283.5 - j) * (283.5 - j)) * (-46) / 283.5),
204 + (int)Math.Round(Math.Sqrt((i - 283.5) * (i - 283.5) + (283.5 - j) * (283.5 - j)) * (-97) / 283.5)
));
pc = new Bitmap(63, 63);
graphics = Graphics.FromImage(pc);
graphics.DrawImage(Properties.Resources.PC, 0, 0, 63, 63);
pcNet = new Bitmap(200, 200);
graphics = Graphics.FromImage(pcNet);
graphics.DrawImage(Properties.Resources.PCNet, 0, 0, 200, 200);
server = new Bitmap(200, 200);
graphics = Graphics.FromImage(server);
graphics.DrawImage(Properties.Resources.Server, 0, 0, 200, 200);
blockBrush = new Pen(Color.FromArgb(153, 0, 0, 0)).Brush;
cursorBrush = new Pen(Color.FromArgb(51, 255, 255, 255)).Brush;
menu = new Bitmap(cell9, cell9);
menuPictureBox.Image = menu;
bitmap = new Bitmap(cell9, cell9);
graphics = Graphics.FromImage(bitmap);
bg = bgc.Allocate(fieldPictureBox.CreateGraphics(), fieldPictureBox.ClientRectangle);
ClientSize = new Size(567, 597);
stepsLabel.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
menuButton.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;
timerLabel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
ClientSize = new Size(cell5, cell5 + 30);
Draw();
}