资源简介
里面注释很详细,界面不太美观,功能都实现了,
有道具前进 道具后退1个 道具后退3 个 滚动条
游戏存档 读取文档等功能。

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
//底下是必须引入的
using System.Threading ;
using System.Media;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
namespace 大富翁
{
public partial class Form1 : Form
{
Random rnd = new Random();
int is_click=0;//用于判断是否要开始只筛子
int num=0;//记录随机数
static int count=0;//记录鼠标点击次数用于判断筛子的变化与停止
int number;//得到的筛子数
static int current_postion;//当前位置
static int postion = 1;//后来的位置
int savepostion = 0;
public Form1()
{
InitializeComponent();
}
private void pictureBox35_Click(object sender EventArgs e)
{
label2.Text = ““;//道具碰到开始行进的时候去掉文字提示
count++;//点击次数加1
isclick(count);
}
private void timer1_Tick(object sender EventArgs e)
{
if (is_click == 1)//点击了筛子
{
//从 1到6.jpg 总共6张图片,在时间增加记录数超过了6,重新设置为0使num变化值在0-5
if (num >= 6)
num = 0;
serve.Image = imageList1.Images[num];//显示第0到5张图片
lblNum.Text = (num + 1).ToString();//记录得到的筛子数
num += 1;
}
}
//针对坐标的人物移动函数
public void pmove()
{
number = Convert.ToInt32(lblNum.Text);//得到筛子数
int move_length = number * 6 + (number - 1) * 50;//得到移动的长度
//在原来的左边距+50+长度为后来的位置
if (label1.Location.X + move_length + 50 <= 556)//后来的位置没有超过第一行
{
label1.Location = new Point(label1.Location.X + move_length + 50 label1.Location.Y);
}
else
{
int have_length=0;
int yhave_length=0;
if (pictureBox10.Location != label1.Location)//起始位置没有在末端
//已经移动的步数
{
have_length= (pictureBox10.Location.X + 50 - label1.Location.X) / 50;
}
else//起始位置就在末端
{
have_length = 0;
}
number = number - have_length;//还剩下的步数
if (num <= 4)//不会出去y方向
{
int y_length = number * 6 + (number - 1) * 50;
label1.Location = new Point(pictureBox10.Location.X pictureBox10.Location.Y + y_length);
}
else//超过了y方向
{
yhave_length = (pictureBox13.Location.Y+ 50 - label1.Location.X) / 50;
number = number - yhave_length;//还剩下的步数
int x_length=number*6+(number-1)*50;
label1.Location = new Point(pictureBox10.Location.X-x_length pictureBox10.Location.Y);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-02-27 12:48 大富翁\
目录 0 2014-02-28 08:38 大富翁\大富翁\
文件 917 2014-02-27 12:48 大富翁\大富翁.sln
文件 22016 2014-02-28 08:38 大富翁\大富翁.suo
目录 0 2014-02-27 20:10 大富翁\大富翁\bin\
目录 0 2014-02-27 20:19 大富翁\大富翁\bin\Debug\
文件 4865018 2014-02-27 19:23 大富翁\大富翁\bin\Debug\1.mp3
文件 3094236 1998-07-07 21:40 大富翁\大富翁\bin\Debug\1.WAV
文件 2938272 1998-07-07 18:57 大富翁\大富翁\bin\Debug\2.WAV
文件 117760 2014-02-28 08:34 大富翁\大富翁\bin\Debug\大富翁.exe
文件 48640 2014-02-28 08:34 大富翁\大富翁\bin\Debug\大富翁.pdb
文件 14328 2014-02-28 08:34 大富翁\大富翁\bin\Debug\大富翁.vshost.exe
文件 490 2009-06-11 05:14 大富翁\大富翁\bin\Debug\大富翁.vshost.exe.manifest
文件 13981 2014-02-28 08:27 大富翁\大富翁\Form1.cs
文件 41809 2014-02-28 00:52 大富翁\大富翁\Form1.Designer.cs
文件 67579 2014-02-28 00:52 大富翁\大富翁\Form1.resx
文件 4089 2014-02-27 21:35 大富翁\大富翁\Helper.cs
文件 3294 2014-02-28 08:38 大富翁\大富翁\login_in.cs
文件 5902 2014-02-28 08:38 大富翁\大富翁\login_in.Designer.cs
文件 77959 2014-02-28 08:38 大富翁\大富翁\login_in.resx
目录 0 2014-02-27 12:48 大富翁\大富翁\obj\
目录 0 2014-02-28 08:34 大富翁\大富翁\obj\Debug\
目录 0 2014-02-27 14:35 大富翁\大富翁\obj\Debug\Refactor\
目录 0 2014-02-27 12:48 大富翁\大富翁\obj\Debug\TempPE\
文件 556 2014-02-28 08:34 大富翁\大富翁\obj\Debug\大富翁.csproj.FileListAbsolute.txt
文件 966 2014-02-28 08:34 大富翁\大富翁\obj\Debug\大富翁.csproj.GenerateResource.Cache
文件 117760 2014-02-28 08:34 大富翁\大富翁\obj\Debug\大富翁.exe
文件 41502 2014-02-28 00:52 大富翁\大富翁\obj\Debug\大富翁.Form1.resources
文件 48262 2014-02-28 08:34 大富翁\大富翁\obj\Debug\大富翁.login_in.resources
文件 48640 2014-02-28 08:34 大富翁\大富翁\obj\Debug\大富翁.pdb
文件 180 2014-02-27 21:54 大富翁\大富翁\obj\Debug\大富翁.Properties.Resources.resources
............此处省略8个文件信息
相关资源
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
评论
共有 条评论