拼图游戏源码,部分代码: private void InitializeLocations() { List allLocations = new List(); allLocations.Clear(); int getRandNumber = rand.Next(1, 17); allLocations.Add(getRandNumber); spaceLocation = getRandNumber;//设置空白位置 for (int i = 1; i < 16; i++) { while (true) { getRandNumber = rand.Next(1, 17); if ((getRandNumber != spaceLocation) && !(allLocations.Contains(getRandNumber))) { break; } } ControlLocation cl = new ControlLocation(); cl.LableNum = i; cl.LocationNum = getRandNumber;//5~1|a|s|p|x clList.Add(cl); allLocations.Add(getRandNumber); } //循环设置每一个lable位置 foreach (ControlLocation cl in clList) { int lableNumber = cl.LableNum; int locationNumber = cl.LocationNum; string getLocation = locations[locationNumber]; string[] locationArray = getLocation.Split(','); Label lable = (Label)this.Controls["label" + lableNumber.ToString()]; lable.Location = new System.Drawing.Point(int.Parse(locationArray[0]), int.Parse(locationArray[1])); } Invalidate(); } private int SelectLocationNumber(int lableNumber) { int result = 0; foreach (ControlLocation cl in clList) { if (cl.LableNum == lableNumber) { result=cl.LocationNum; } } return result; }
2022-06-25 14:07:40 2.05MB c# 游戏 源码
1
利用C#编写的一个小游戏,模拟弹球游戏,方便好玩,还有一些小bug,继续努力
2022-06-24 06:34:29 338KB C# 游戏 弹球
1
C#程序练手之二: 纸牌游戏 游戏板上有16个位置,编号从0到15 0. 1. 2. 3 4. 5. 6. 7 8. 9. 10.11 12.13.14.15 2组8个数,初始化时,牌面朝下。当玩家单击一张牌时,这张牌翻过来。当玩家单击第二张牌时,第二张牌也会翻过来。如果揭开的两张牌相同,则这两张牌必须从游戏板上消失。如果这两张牌不同,玩家需要单击第三张牌。只要玩家单击第三张牌,前两张牌必须自动面朝下。此过程会一直继续到所有牌从游戏板上移除为止。 为了放置每张牌,计算机需要生成1到8之间的随机数,并将牌放到游戏板上生成的位置处,假设此位置还未填满。如果此位置已经填满,则在找到空位置之前生成另一个数字。
2022-05-19 21:57:25 2.04MB C# 游戏 Card Game
1
简单贪吃蛇项目,WASD控制蛇上下移动吃食物,J选择结束或者开始游戏
2022-05-12 14:24:02 240KB c# 游戏 visual studio
1
Unity游戏源码, 塔防游戏源码 , 画面超级好看, 适合学习和二次开发 。 是UnityPackage文件,直接编译器创建个空项目导入就行了 , 直接可运行使用的 , C#语言的! C#语言的!! C#语言的!!! 重要的事说三遍!!!! 直接打开就行了,无需其他操作 , 使用2021.2.8f1c1版本编译器正常运行 , 其他版本的编译器没测试 , 应该也可以。 需要其他类型游戏源码可以联系我 , 存量很多 , 量大从优 , CSDN上面自动定价 需要便宜点也可以联系我修改价格 , QQ:168647474
2022-04-18 13:06:16 231.68MB unity 游戏 c# 游戏源码
Unity游戏源码 , 完整的项目 , 适合学习和二次开发 。 是整个完整的UnityPackage包 , 使用新版本编译器请自行升级编译器设置就行 , C#语言的! C#语言的!! C#语言的!!! 重要的事说三遍!!!! 直接创建空项目导入打开就行了,无需其他操作 , 使用2021.2.8f1c1版本编译器正常运行 , 其他版本的编译器没测试 , 应该也可以。 需要其他类型游戏源码可以联系我 , 存量很多 , 量大从优 , QQ:168647474
2022-04-18 13:06:12 19.8MB unity游戏源码 unity源码 C# 游戏源码
摘要:C#源码,游戏开发,GDI+,逃离飞碟  C#游戏:逃离飞碟源码,支持游戏难易度选择,还可以更换界面皮肤,学Csharp有一个多月了,清明节期间从网上下了个坦克游戏研究,然后经我改造,就变成了“逃离飞碟游戏”,游戏比较单调,但代码注释很详细。主要还是方向控制算法和随机算法还有一个就是碰撞检测函数以及一些基本的GDI+技术等。
2022-04-09 15:12:02 466KB C#源代码 游戏开发
1
I wa nt to help you make your game. Everyone has a great game idea, but the path from initial idea to finished prod uct is not a clear one. There are an intimi dating number of progr amming languages, libraries, and prod uction methods. Even experienced game developers often fail to realize their vision. Without a good solid architecture, game code may become so compli cated that a de veloper drowns in the complex ity. The more complex the code, the hard er the game becomes to change or continue dev eloping. This book sho ws how to write simple , clean, reliable code by dev eloping two basi c games. These games are built using the C# progr amming language and Ope nGL. C# is a modern, high- level programmi ng language, so writing code is faster, with fewer progr amming warts to avoid. OpenGL is as close as the game indus try has to a stan dard wa y to display graph ics. Whe n the book is finis hed, you’ll have an excellent code base to develop and grow , pursuing your own ideas.
2022-04-01 20:27:33 3.91MB C# game
1
C#写的超简单的局域网对战游戏 理解socket编程 和简单的C#2d画图
2022-03-18 16:38:06 1.07MB c# 游戏 socket
1
在unity3d引擎中,将该代码类,直接拖拽到摄像机上,就可以实现相机的前进后退、旋转、上下左右移动,配合滚轮、右键。也可以和键盘的键组合使用,代码简单易懂,可以扩展。
2022-03-05 14:25:56 6KB Unity3D C# 游戏开发 亲测好用
1