源码描述:
一、源码特点
采用winform进行开发,这个游戏制作全靠游戏的逻辑。看看谁是高手,能洞彻其中的奥秘
二、功能介绍
本源码是一个神秘猜心术游戏源码,见证奇迹的时刻到了,欢迎下载
三、菜单功能
1、运行后,点击开始游戏即可进入游戏,点击退出,即可关闭游戏
2、进入游戏后,请按照右侧游戏规则,默想心中的数字,然后点击奇迹按钮,就是见证奇迹的时刻啦
3、点击继续可以重新玩,看看你能不能洞悉其中的奥秘
四、注意事项
1、开发环境为Visual Studio 2010,使用.net 4.0开发。
关键代码:
public void writeView()
{
int ax = 127;
int ay = 2;
int intx = -100;
startPanl.Hide();
//选定幸运数
int r = rd.Next(30);
numN = r;
int n = 0;
int nb = 0;
for (int i = 0; i < 15; i++)
{
for (int j = 0; j < 7; j++)
{
if (nb <= 99)
{
n = rd.Next(30);
if (nb % 9 == 0)
{
writeImage(nb, r, intx += ax, ay);
}
else
{
writeImage(nb, n, intx += ax, ay);
}
nb++;
}
}
intx = -100;
ay += 127;
}
yScorll.Maximum = gamePanl.Height / 2 + 300;
yScorll.Visible = true;
viewPanl.Height = gamePanl.Height;
}
运行效果图: