• 大小: 2.21M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: 游戏  C#  推箱子  

资源简介

本推箱子游戏使用数组实现,用不同的数字标识不同的物体,从而简化了人物移动的判断过程

代码片段和文件信息

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.Media;

namespace 推箱子2._0
{
    public partial class Form1 : Form
    {
        public  const int len=10;//数组长度
        int [] num = new int[lenlen];//初始化数组,数组元素全为0
        public const int height = 50 width = 50;//墙的长宽
        int rowcol;//标记人物位置
        int direction = 2;//方向1,2,3,4代表上下左右
        //SoundPlayer player = new SoundPlayer();
        int leval = 1;//关卡等级标记
        int map = 1;//地图
        public Form1()
        {
            InitializeComponent();
            initNum();
            this.KeyPreview = true;
            this.BackgroundImage = new Bitmap(@

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1568  2018-10-25 13:35  推箱子2.0\bin\Debug\map1\box2.jpg

     文件       3011  2018-10-17 21:55  推箱子2.0\bin\Debug\map1\floor1.png

     文件    1032496  2018-10-17 20:55  推箱子2.0\bin\Debug\map1\floor2.jpg

     文件       5358  2018-10-25 15:42  推箱子2.0\bin\Debug\map1\pic02.png

     文件      13230  2018-10-25 15:56  推箱子2.0\bin\Debug\map1\pic03.jpg

     文件       1928  2018-10-25 15:45  推箱子2.0\bin\Debug\map1\pic03.png

     文件       4123  2018-10-25 15:35  推箱子2.0\bin\Debug\map1\pic04down.png

     文件       3916  2018-10-25 15:35  推箱子2.0\bin\Debug\map1\pic04left.png

     文件       3915  2018-10-25 15:35  推箱子2.0\bin\Debug\map1\pic04right.png

     文件       3749  2018-10-25 15:35  推箱子2.0\bin\Debug\map1\pic04up.png

     文件       5462  2018-10-25 15:35  推箱子2.0\bin\Debug\map1\pic05.png

     文件       5676  2018-10-25 15:35  推箱子2.0\bin\Debug\map1\pic06.png

     文件       3141  2018-10-17 21:55  推箱子2.0\bin\Debug\map1\wall.png

     文件       4273  2018-10-25 15:39  推箱子2.0\bin\Debug\map1\wall2.png

     文件       4612  2018-10-25 14:39  推箱子2.0\bin\Debug\map2\ball.png

     文件        393  2018-10-25 14:39  推箱子2.0\bin\Debug\map2\block.gif

     文件       4483  2018-10-25 14:39  推箱子2.0\bin\Debug\map2\box.png

     文件      14705  2018-10-25 14:39  推箱子2.0\bin\Debug\map2\person5.jpg

     文件       4153  2018-10-25 14:39  推箱子2.0\bin\Debug\map2\person6.png

     文件       6011  2018-10-25 14:39  推箱子2.0\bin\Debug\map2\person_down.png

     文件       5274  2018-10-25 14:39  推箱子2.0\bin\Debug\map2\person_left.png

     文件       5551  2018-10-25 14:39  推箱子2.0\bin\Debug\map2\person_right.png

     文件       5395  2018-10-25 14:39  推箱子2.0\bin\Debug\map2\person_up.png

     文件       4767  2018-10-25 14:39  推箱子2.0\bin\Debug\map2\wall.png

     文件      22528  2018-11-04 14:18  推箱子2.0\bin\Debug\推箱子2.0.exe

     文件      40448  2018-11-04 14:18  推箱子2.0\bin\Debug\推箱子2.0.pdb

     文件      11600  2018-11-04 14:19  推箱子2.0\bin\Debug\推箱子2.0.vshost.exe

     文件        490  2018-04-12 07:35  推箱子2.0\bin\Debug\推箱子2.0.vshost.exe.manifest

     文件      19976  2018-11-04 14:18  推箱子2.0\Form1.cs

     文件      12965  2018-10-27 12:12  推箱子2.0\Form1.Designer.cs

............此处省略63个文件信息

评论

共有 条评论