首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

扫雷游戏制作教程

【千里优选教学基地】

实验小屋

Labview

004扫雷游戏(鼠标操作部分)

大家一起来学编程,像画画一样的编程,希望通过学习的过程开发孩子的脑力与智力。学的不是版本,是方法,版本高有什么用,关键是思维和思路。

通过本节的11分钟制作过程来掌握:

数组的操作

双线程编程设计

游戏的制作机制

【备注】本课程适用于15岁以上的学生

004教学视频

【备注】视频中没有添加等待时间结构,一定要添加

★ 游戏制作步骤 ★

Game Making Steps

○ ○ 01 ○ ○

主要线程

Main thread

核心数据

Core data

图片大小一定是500x500;

The size of the picture must be 500x500

遮挡数组是10*10数组,每个元素是一个图片下拉列表大小是50x50正好组成500x500;

The blocked array is a 10*10 array. Each element is a picture drop-down list.The size is 50x50, which is exactly 500x500.

布雷数组是10*10数组,每个元素是一个图片下拉列表大小是50x50正好组成500x500;

The mine array is a 10*10 array. Each element is a picture drop-down list.The size is 50x50, which is exactly 500x500.

三个控件叠加在一起,底层布雷数组,中部遮挡数组,顶层是禁用并变灰的图片

The three controls are stacked together, the bottom laying mines array, the middle blocking the array, and the top layer is the forbidden and gray picture.

○ ○ 02 ○ ○

主界面

Main interface

○ ○ 03 ○ ○

禁用并变灰图片,消除右键干扰,方便编程,注意最后把禁用变灰改成禁用状态;

Disable and change the gray picture, eliminate the right key interference, facilitate programming, pay attention to turn the disable ash into disable state.

○ ○ 04 ○ ○

调用图片特殊功能属性节点获取鼠标功能

Call the special function node of the picture to get the mouse function.

○ ○ 05 ○ ○

获取鼠标按钮信息

Get the mouse button information

○ ○ 06 ○ ○

协调双线程,同时运行两个while循环,一个停止按钮控制;

Coordinated double thread Run two while loops at the same time, a stop button control.

○ ○ 07 ○ ○

鼠标按键操作关联状态数组,当鼠标右键按下时修改遮挡数组元素状态

Mouse button operation associated state array.Modify the block array element state when the right mouse button is pressed.

○ ○ 08 ○ ○

获取鼠标按键操作

Get the mouse button operation

○ ○ 09 ○ ○

数组建立与替换

Array establishment and replacement

○ ○ 10 ○ ○

添加数据引索,转换成数组,运用图片下拉列表优化数组

Add data dropper, convert to array, useimage drop-down listto optimize array.

○ ○ 11 ○ ○

图片层与状态层

Picture layer and state layer

【源文件下载】扫雷(鼠标操作部分)

在乎­这是一种拿不起、放不下的心态,它的反面不是放弃,而是天马行空,自由自在,永远保持革命乐观主义的精神。

缺陷­也许你个子矮,也许你长得不好看,也许你的嗓音像唐老鸭、、、那么你的优势就是你不会被自己表面的浅薄的亮点所耽搁,少花一些时间,少走一些弯路,直接发现你内在的优势,直接挖掘自己深层的潜能。

孤独­这是为自由付出的代价。

谣言­这是一种传染病,沉默是最好的疫苗。除非你能找出传染源,否则解释恰恰会成为病毒传播最理想的条件。

" 本扫雷游戏制作为原创公益教学课程,不得用于获利性活动。"

——梦魄@行动(2018/05/06)

" Minesweeper game is an original public interest teaching course, and it should not be used for profitable activities ".

——Dream doing(2018/05/06)

千 里 优 选 教 学 基 地

微信公众号:qlyxgy

  • 发表于:
  • 原文链接http://kuaibao.qq.com/s/20180506G0I35J00?refer=cp_1026
  • 腾讯「腾讯云开发者社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 cloudcommunity@tencent.com 删除。

扫码

添加站长 进交流群

领取专属 10元无门槛券

私享最新 技术干货

扫码加入开发者社群
领券